Hide
For example:
mockObject.returns("value1").testMethod(null, null, null);
mockObject.returns("value2").testMethod("arg1", null, null);
should return value2 if invoked with "arg1" as first argument value.
This way you could for example specify the default behavior in the before method and then specify more specific behavior in the test methods.
E.g
public class MyTest {
@Before
public void setDefaults(){
mockObject.returns("value1").testMethod(null, null, null);
}
@Test
public void myTest(){
mockObject.returns("value2").testMethod("arg1", null, null);
....
}
}
Show
For example:
mockObject.returns("value1").testMethod(null, null, null);
mockObject.returns("value2").testMethod("arg1", null, null);
should return value2 if invoked with "arg1" as first argument value.
This way you could for example specify the default behavior in the before method and then specify more specific behavior in the test methods.
E.g
public class MyTest {
@Before
public void setDefaults(){
mockObject.returns("value1").testMethod(null, null, null);
}
@Test
public void myTest(){
mockObject.returns("value2").testMethod("arg1", null, null);
....
}
}