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")))