Package io.datarouter.mockito
Annotation Type DefineMock
@Target(FIELD) @Retention(RUNTIME) @Documented public @interface DefineMock
Similar to org.mockito.Mock, for use with testng+guice.
@Guice(moduleFactory = MyLibraryModuleFactory.class)
public class MyLibraryIntegrationTests{
@BindMock
@Inject
private MyDependency myDependency;
@Inject
private MyLibrary myLibrary;
@Test
public void test(){
Mockito.doReturn(true).when(myDependency).foo();
myLibrary.bar();
}
}
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description org.mockito.AnswersanswerClass<?>[]extraInterfacesStringname