コード例 #1
0
 @Test
 public void testDependency_UnMockBean() {
   new Expectations() {
     {
       when(springBeanService2.getDependency1()).thenReturn(dependency2);
       when(springBeanService2.getDependency2()).thenReturn(dependency2);
     }
   };
   want.object(springBeanService2.getDependency1()).notNull();
   want.object(springBeanService2.getDependency2()).notNull();
 }
コード例 #2
0
 public void testDependency_MockBean() {
   want.object(springBeanService1.getDependency1()).notNull();
   want.object(springBeanService1.getDependency2()).notNull();
 }