【发布时间】:2014-03-21 00:23:05
【问题描述】:
有没有办法验证在 Mockito 中 methodTwo 之前是否调用了 methodOne?
public class ServiceClassA {
public void methodOne(){}
}
public class ServiceClassB {
public void methodTwo(){}
}
public class TestClass {
public void method(){
ServiceClassA serviceA = new ServiceClassA();
ServiceClassB serviceB = new ServiceClassB();
serviceA.methodOne();
serviceB.methodTwo();
}
}
【问题讨论】:
标签: java unit-testing mockito