1
想象的属性值,我有一个EasyMock的测试中,我有以下行:检查在EasyMock的匹配
final IRunControl runControl = createMock(IRunControl.class);
runControl.setSomething(isA(ISomething.class));
EasyMock.expectLastCall().once();
ISomething
看起来是这样的:
interface ISomething
{
int getValue1();
String getValue2();
}
是否有可能使runControl.setSomething(isA(ISomething.class))
检查适当的值?
I.e。做类似
runControl.setSomething(
and(
isA(ISomething.class),
and(propertyValue("value1", 123), propertyValue("value2", "expectedValue2")))