Quantcast
Viewing latest article 3
Browse Latest Browse All 3

Netflix Governator Tests – Introducing governator-junit-runner

Consider a typical Netflix Governator junit test.                     public class SampleWithGovernatorJunitSupportTest { @Rule public LifecycleTester tester = new LifecycleTester(); @Test public void testExampleBeanInjection() throws Exception { tester.start(); Injector injector = tester .builder() .withBootstrapModule(new SampleBootstrapModule()) .withModuleClass(SampleModule.class) .usingBasePackages("sample.gov") .build() .createInjector(); BlogService blogService = injector.getInstance(BlogService.class); assertThat(blogService.get(1l), is(notNullValue())); assertThat(blogService.getBlogServiceName(), equalTo("Test ...

Viewing latest article 3
Browse Latest Browse All 3

Trending Articles