Skip to content

Commit

Permalink
stop using "test" prefix in test method names
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Nov 23, 2023
1 parent 0cda29b commit 30e5749
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CxfModuleIT {
static class TestBus extends ExtensionManagerBus {}

@Test
public void testOverrideBusImplementation() {
public void overrideBusImplementation() {

BQRuntime runtime = testFactory.app()
.override(CxfModule.class)
Expand All @@ -36,7 +36,7 @@ public void testOverrideBusImplementation() {
}

@Test
public void testDefaultContents() {
public void defaultContents() {
BQRuntime runtime = testFactory.app().createRuntime();

assertNotNull(runtime.getInstance(Key.get(Bus.class)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void initialize(Bus bus) {
}

@Test
public void testFeatureIsLoaded() {
public void featureIsLoaded() {
BQRuntime runtime = testFactory.app().module(binder -> {
CxfModule.extend(binder).addFeature(Feature1.class);
}).createRuntime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void handleFault(Message message) {
final BQTestFactory testFactory = new BQTestFactory().autoLoadModules();

@Test
public void testNoBusInterceptors() {
public void noBusInterceptors() {
BQRuntime runtime = testFactory.app().createRuntime();
Bus bus = runtime.getInstance(Bus.class);

Expand All @@ -45,7 +45,7 @@ public void testNoBusInterceptors() {
}

@Test
public void testBusInterceptors() {
public void busInterceptors() {


NullInterceptor in = new NullInterceptor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void atLeastOneSourceIsRequired() {
}

@Test
public void testGetBeanNamesOfType_emptySource() {
public void getBeanNamesOfType_emptySource() {

when(source1.getBeanNamesOfType(eq(Long.class))).thenReturn(emptyList());
when(source2.getBeanNamesOfType(eq(Long.class))).thenReturn(asList("test", "test2"));
Expand All @@ -45,7 +45,7 @@ public void testGetBeanNamesOfType_emptySource() {
}

@Test
public void testGetBeanNamesOfType_nullSource() {
public void getBeanNamesOfType_nullSource() {

when(source1.getBeanNamesOfType(eq(Long.class))).thenReturn(null);
when(source2.getBeanNamesOfType(eq(Long.class))).thenReturn(asList("test", "test2"));
Expand All @@ -56,7 +56,7 @@ public void testGetBeanNamesOfType_nullSource() {
}

@Test
public void testGetBeanNamesOfType_mergeResults() {
public void getBeanNamesOfType_mergeResults() {

when(source1.getBeanNamesOfType(eq(Long.class))).thenReturn(asList("_test", "_test2"));
when(source2.getBeanNamesOfType(eq(Long.class))).thenReturn(asList("test", "test2"));
Expand All @@ -68,7 +68,7 @@ public void testGetBeanNamesOfType_mergeResults() {


@Test
public void testGetBeanOfType_nullFirstSource() {
public void getBeanOfType_nullFirstSource() {
when(source1.getBeanOfType(anyString(), eq(Long.class))).thenReturn(null);
when(source2.getBeanOfType(anyString(), eq(Long.class))).thenReturn(3L);

Expand All @@ -79,7 +79,7 @@ public void testGetBeanOfType_nullFirstSource() {


@Test
public void testGetBeanOfType_nullBothSources() {
public void getBeanOfType_nullBothSources() {
when(source1.getBeanOfType(anyString(), eq(Long.class))).thenReturn(null);
when(source2.getBeanOfType(anyString(), eq(Long.class))).thenReturn(null);

Expand All @@ -89,7 +89,7 @@ public void testGetBeanOfType_nullBothSources() {
}

@Test
public void testGetBeanOfType_notNullBothSources() {
public void getBeanOfType_notNullBothSources() {
when(source1.getBeanOfType(anyString(), eq(Long.class))).thenReturn(2L);
when(source2.getBeanOfType(anyString(), eq(Long.class))).thenReturn(3L);

Expand All @@ -101,7 +101,7 @@ public void testGetBeanOfType_notNullBothSources() {


@Test
public void testGetBeansOfType_emptySource() {
public void getBeansOfType_emptySource() {


when(source1.getBeansOfType(eq(Long.class))).thenReturn(emptyList());
Expand All @@ -113,7 +113,7 @@ public void testGetBeansOfType_emptySource() {
}

@Test
public void testGetBeansOfType_nullSource() {
public void getBeansOfType_nullSource() {


when(source1.getBeansOfType(eq(Long.class))).thenReturn(null);
Expand All @@ -126,7 +126,7 @@ public void testGetBeansOfType_nullSource() {


@Test
public void testGetBeansOfType_mergeSource() {
public void getBeansOfType_mergeSource() {
when(source1.getBeansOfType(eq(Long.class))).thenReturn((Collection) asList(1L, 3L));
when(source2.getBeansOfType(eq(Long.class))).thenReturn((Collection) asList(2L, 3L));

Expand All @@ -136,7 +136,7 @@ public void testGetBeansOfType_mergeSource() {
}

@Test
public void testLoadBeansOfType() {
public void loadBeansOfType() {

ConfiguredBeanLocator.BeanLoaderListener listener = mock(ConfiguredBeanLocator.BeanLoaderListener.class);
multisourceBeanLocator.loadBeansOfType(Long.class, listener);
Expand All @@ -146,7 +146,7 @@ public void testLoadBeansOfType() {
}

@Test
public void testHasConfiguredPropertyValue_firstLocator() {
public void hasConfiguredPropertyValue_firstLocator() {
when(source1.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(true);
when(source2.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false);

Expand All @@ -155,15 +155,15 @@ public void testHasConfiguredPropertyValue_firstLocator() {
}

@Test
public void testHasConfiguredPropertyValue_secondLocator() {
public void hasConfiguredPropertyValue_secondLocator() {
when(source1.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false);
when(source2.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(true);

assertTrue(multisourceBeanLocator.hasConfiguredPropertyValue("test", "testProp", "val"));
}

@Test
public void testHasConfiguredPropertyValue_noLocator() {
public void hasConfiguredPropertyValue_noLocator() {
when(source1.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false);
when(source2.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false);

Expand All @@ -172,7 +172,7 @@ public void testHasConfiguredPropertyValue_noLocator() {


@Test
public void testHasBeanOfName_firstLocator() {
public void hasBeanOfName_firstLocator() {
when(source1.hasBeanOfName(eq("test"))).thenReturn(true);
when(source2.hasBeanOfName(eq("test"))).thenReturn(false);

Expand All @@ -181,15 +181,15 @@ public void testHasBeanOfName_firstLocator() {
}

@Test
public void testHasBeanOfName_secondLocator() {
public void hasBeanOfName_secondLocator() {
when(source1.hasBeanOfName(eq("test"))).thenReturn(false);
when(source2.hasBeanOfName(eq("test"))).thenReturn(true);

assertTrue(multisourceBeanLocator.hasBeanOfName("test"));
}

@Test
public void testHasBeanOfName_noLocator() {
public void hasBeanOfName_noLocator() {
when(source1.hasBeanOfName(eq("test"))).thenReturn(false);
when(source2.hasBeanOfName(eq("test"))).thenReturn(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class CxfJaxrsModuleDefaultIT {
.createRuntime();

@Test
public void testResponse() throws IOException {
public void response() throws IOException {
HttpResponse response = Request.Get("http://localhost:8080/").execute().returnResponse();

assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
public class CxfJaxrsModuleProviderTest {

@Test
public void testAutoLoadable() {
public void autoLoadable() {
BQModuleProviderChecker.testAutoLoadable(CxfJaxrsModuleProvider.class);

}

@Test
public void testMetadata() {
public void metadata() {
BQModuleProviderChecker.testMetadata(CxfJaxrsModuleProvider.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public class CxfJaxwsClientModuleProviderIT {
final BQTestFactory testFactory = new BQTestFactory();

@Test
public void testAutoLoadable() {
public void autoLoadable() {
BQModuleProviderChecker.testAutoLoadable(CxfJaxwsClientModuleProvider.class);
}

@Test
public void testModuleDeclaresDependencies() {
public void moduleDeclaresDependencies() {
final BQRuntime bqRuntime = testFactory.app().moduleProvider(new CxfJaxwsClientModuleProvider()).createRuntime();
BQRuntimeChecker.testModulesLoaded(bqRuntime,
CxfModule.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void handleFault(Message message) {
final BQTestFactory testFactory = new BQTestFactory().autoLoadModules();

@Test
public void testNoClientInterceptors() {
public void noClientInterceptors() {
testFactory.app().createRuntime();

JaxWsProxyFactoryBean proxyFactoryBean = new JaxWsProxyFactoryBean();
Expand All @@ -52,7 +52,7 @@ public void testNoClientInterceptors() {


@Test
public void testClientInterceptors() {
public void clientInterceptors() {

NullInterceptor in = new NullInterceptor();
NullInterceptor inFault = new NullInterceptor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class SimpleJavaFirstIT {
static final BQTestFactory TEST_FACTORY = new BQTestFactory().autoLoadModules();

@Test
public void testSimpleService() {
public void simpleService() {

HelloWorldImpl serviceImpl = new HelloWorldImpl();
TEST_FACTORY.app("-s")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void setUp() throws Exception {
}

@Test
public void testUpdateCustomer() throws Exception {
public void updateCustomer() {

Customer customer = new Customer();
customer.setBirthDate(new Date());
Expand All @@ -60,7 +60,7 @@ public void testUpdateCustomer() throws Exception {
}

@Test
public void testExistingCustomer() throws NoSuchCustomerException {
public void existingCustomer() throws NoSuchCustomerException {

Customer testCustomer = CLIENT.getCustomersByName("test").get(0);

Expand All @@ -73,7 +73,7 @@ public void testExistingCustomer() throws NoSuchCustomerException {
}

@Test
public void testNonExistingCustomer() {
public void nonExistingCustomer() {

boolean thrown = false;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Endpoint get() {
}

@Test
public void testProvideEndpointsFromDifferentModules() {
public void provideEndpointsFromDifferentModules() {
BQRuntime runtime = testFactory.app()
.module(binder -> CxfJaxwsServerModule.extend(binder)
.addEndpoint(EndpointFactoryProvider1.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public class CxfJaxwsServerModuleProviderIT {
final BQTestFactory testFactory = new BQTestFactory();

@Test
public void testAutoLoadable() {
public void autoLoadable() {
BQModuleProviderChecker.testAutoLoadable(CxfJaxwsServerModuleProvider.class);
}

@Test
public void testModuleDeclaresDependencies() {
public void moduleDeclaresDependencies() {
final BQRuntime bqRuntime = testFactory.app().moduleProvider(new CxfJaxwsServerModuleProvider()).createRuntime();
BQRuntimeChecker.testModulesLoaded(bqRuntime,
JettyModule.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public String toString() {
final BQTestFactory testFactory = new BQTestFactory().autoLoadModules();

@Test
public void testNoEndpointInterceptors() {
public void noEndpointInterceptors() {
BQRuntime runtime = testFactory.app()
.module(binder -> CxfJaxwsServerModule.extend(binder).addEndpoint(() -> Endpoint.publish("/test", new HelloWorldImpl())))
.createRuntime();
Expand All @@ -78,7 +78,7 @@ private Set<Endpoint> getEndpoints(BQRuntime runtime) {


@Test
public void testEndpointInterceptors() {
public void endpointInterceptors() {


NullInterceptor in = new NullInterceptor("in");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static class Injectee {
final BQTestFactory testFactory = new BQTestFactory().autoLoadModules();

@Test
public void testNewInstanceInjections() {
public void newInstanceInjections() {
Injectee injectee = new Injectee();

testFactory.app().module(binder -> {
Expand All @@ -57,7 +57,7 @@ public void testNewInstanceInjections() {
}

@Test
public void testProvidedInjections() {
public void providedInjections() {
Injectee injectee = new Injectee();

BQRuntime runtime = testFactory.app().module(binder -> {
Expand Down

0 comments on commit 30e5749

Please sign in to comment.