Код: Выделить всё
Interface MyInterface {
myMethodToBeVerified (String, String);
}
Код: Выделить всё
class MyClassToBeTested implements MyInterface {
myMethodToBeVerified(String, String) {
…….
}
}
Код: Выделить всё
class MyClass {
MyInterface myObj = new MyClassToBeTested();
public void abc(){
myObj.myMethodToBeVerified (new String(“a”), new String(“b”));
}
}
Код: Выделить всё
class MyClassTest {
MyClass myClass = new MyClass();
@Mock
MyInterface myInterface;
testAbc(){
myClass.abc();
verify(myInterface).myMethodToBeVerified(new String(“a”), new String(“b”));
}
}
может кто-нибудь подскажет решения.
Подробнее здесь: https://stackoverflow.com/questions/205 ... nteraction
Мобильная версия