oneOf(statement).execute();//This is present in actual method implementation so it isneeded.
oneOf(statement).addBatch();//This is not needed . But test passes whether it is present in my test code or not. I expect test to fail (saying expected method was not invoked) but this does not happen.
On Thu, Aug 5, 2010 at 5:44 PM, Panos Konstantinidis <girionis@...> wrote:
Maybe you forgot to assert them and you don't even call the assertions on them.
From: Ashutosh Kumar <ashutosh.k78@...> Subject: [jmock-user] test is not failing for additional expectations
To: user@... Date: Thursday, August 5, 2010, 1:11 PM
My test case works correctly if I define all expectations(it passes) or if I do not define some of the expectations(it fails). But if I define some additional expectations using one of , I expect test to fail as these methods are not there in actual implementation. But still the test passes.