Hi,
With the old dyna mocks, I had:
CallSequence sequence1 = new CallSequence();
sequence1.expectReturn(new Constraint[] {C.eq(1)}, "FIRSTNAME");
sequence1.expectReturn(new Constraint[] {C.eq(2)}, "LASTNAME");
mockResultSetMetaData.expect("getColumnName", sequence1);
I guess, the new canonical way of writing this is simply:
mockResultSetMetaData.expectAndReturn("getColumnName", C.eq(1),
"FIRSTNAME");
mockResultSetMetaData.expectAndReturn("getColumnName", C.eq(2),
"LASTNAME");
Is this correct? (It works here but I'd like to make sure I'm doing it
correctly :-)).
Thanks
-Vincent
|