예제 #1
0
 @Test
 public void testBeanInjection() {
   assertNotNull(this.localeProvider);
   assertNotNull(this.bean);
   assertNotNull(this.bean.messages);
   assertEquals(this.localeProvider, this.bean.localeProvider);
   assertEquals(
       "wrong current locale", expected.getLocale(), this.bean.localeProvider.getCurrentLocale());
   assertEquals("wrong injected locale", expected.getLocale(), this.bean.currentLocale);
 }
예제 #2
0
 @Before
 public void init() {
   this.localeProvider = container.instance().select(LocaleProvider.class).get();
   this.localeProvider.setCurrentLocale(expected.getLocale());
   this.bean = container.instance().select(TestBean.class).get();
 }