Java Mailing List Archive

http://www.gg3721.com/

Home » user.jmock »

[jmock-user] Peculiar expectation error

Sam

2009-11-30

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

I'm experiencing a peculiar error with the expectations in my unit tests - it's
as if expectations from previously run unit tests (run in the same process) are
being 'remembered' and included in the expectations of other tests. Thus the
unit tests for an entire unit test class are failing when executed as a whole
but pass when executed individually - i.e. expectations from other tests cannot
bleed over into the current, individual test. Now this shouldn't happen because
of the creation of the anonymous inner class, correct?:

context.checking(new Expectations() {{
 expectation1;
 expectation2;
}});

I really have no idea what's going on - hopefully someone else does!

Thanks,
Sam




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.