Esempio n. 1
0
 @Test
 public void lookupSingleton() {
   SingletonBean bean = finder.find(SingletonBean.class);
   assertThat(bean).isNotNull();
   SingletonBean bean2 = finder.find(SingletonBean.class);
   assertThat(bean).isSameAs(bean2);
 }
Esempio n. 2
0
 @Test
 public void lookupPrototype() {
   Bean bean = finder.find(Bean.class);
   assertThat(bean).isNotNull();
   Bean bean2 = finder.find(Bean.class);
   assertThat(bean).isNotSameAs(bean2);
 }
Esempio n. 3
0
 @Test(expected = BeanNotFoundFailure.class)
 public void tooMany() {
   TooMany found = finder.find(TooMany.class);
   assertThat(found).isNotNull();
 }
Esempio n. 4
0
 @Test(expected = BeanNotFoundFailure.class)
 public void notFound() {
   finder.find(getClass());
 }