@Test public void testClassMethodsAreBuilderStyle() { /* HColumnDescriptor should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * HColumnDescriptor hcd * = new HColumnDescriptor() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ BuilderStyleTest.assertClassesAreBuilderStyle(HColumnDescriptor.class); }
@Test public void testClassMethodsAreBuilderStyle() { /* HTableDescriptor should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * HTableDescriptor htd * = new HTableDescriptor() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ BuilderStyleTest.assertClassesAreBuilderStyle(HTableDescriptor.class); }
@Test public void testClassMethodsAreBuilderStyle() { /* ReplicationPeerConfig should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * ReplicationPeerConfig htd * = new ReplicationPeerConfig() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ BuilderStyleTest.assertClassesAreBuilderStyle(ReplicationPeerConfig.class); }
@Test public void testClassMethodsAreBuilderStyle() { /* HColumnDescriptor should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * HColumnDescriptor hcd * = new HColumnDescriptor() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ BuilderStyleTest.assertClassesAreBuilderStyle(ColumnFamilyDescriptorBuilder.class); }
@Test public void testClassMethodsAreBuilderStyle() { /* ImmutableHTableDescriptor should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * ImmutableHTableDescriptor d * = new ImmutableHTableDescriptor() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ BuilderStyleTest.assertClassesAreBuilderStyle(ImmutableHTableDescriptor.class); }
@Test public void testClassMethodsAreBuilderStyle() { /* ReplicationPeerConfig should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * QuotaFilter qf * = new QuotaFilter() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ BuilderStyleTest.assertClassesAreBuilderStyle(QuotaFilter.class); }
@Test @SuppressWarnings("rawtypes") public void testOperationSubClassMethodsAreBuilderStyle() { /* All Operation subclasses should have a builder style setup where setXXX/addXXX methods * can be chainable together: * . For example: * Scan scan = new Scan() * .setFoo(foo) * .setBar(bar) * .setBuz(buz) * * This test ensures that all methods starting with "set" returns the declaring object */ // TODO: We should ensure all subclasses of Operation is checked. Class[] classes = new Class[] { Operation.class, OperationWithAttributes.class, Mutation.class, Query.class, Delete.class, Increment.class, Append.class, Put.class, Get.class, Scan.class}; BuilderStyleTest.assertClassesAreBuilderStyle(classes); }
@Test public void testClassMethodsAreBuilderStyle() { BuilderStyleTest.assertClassesAreBuilderStyle(ImmutableHColumnDescriptor.class); }
@Test public void testClassMethodsAreBuilderStyle() { BuilderStyleTest.assertClassesAreBuilderStyle(TableDescriptorBuilder.class); }