From: Francois B. <fb...@us...> - 2003-08-27 14:20:19
|
Hi, There is expect(), expectAndReturn() and expectAndThrow. For the match methods we have matchAndReturn() and matchAndThrow(). There are no match() methods. It is possible to simulate this by using matchAndReturn() and returning Void.TYPE though. Should the Mock/OrderedMock implementations have simple match() methods ? Even though the methods return no element, they might be called anyway. For example, Hibernate has a Session object. In one test, I expect() that disconnect() will be called. Then, in other tests, I know this method will be called, so I simply match("disconnect", C.NO_ARGS).=20 Currently, I need to matchAndReturn("disconnect", C.NO_ARGS, Void.TYPE). Thanks ! Fran=E7ois Developer of Java Gui Builder http://jgb.sourceforge.net/ |