java - JMock Allow Other Method Calls -
i'm using jmock test behavior of class using object. want test method a()
called. however, b()
, c()
called on object too. therefore if expectations expect a()
, must expect b()
, c()
make test pass. there way test method, , allow else?
expect a()
allow methods b()
& c()
mockery.checking(new expectations() {{ one(mockobject).a(); allowing(mockobject).b(); allowing(mockobject).c(); }});
expect a()
allow other methods.
mockery.checking(new expectations() {{ one(mockobject).a(); allowing(mockobject); }});
Comments
Post a Comment