File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EASYMOCK and threads?

 
Zack Mccraken
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With EasyMock 3, My test runs and pass individually, but not pass when I run all test of a package at the same time. I do the setup (EasyMock.createNiceMock...)
and the tearDown (EasyMock.resetToDefault()...). The trace is:

ava.lang.IllegalStateException: 0 matchers expected, 1 recorded.
This exception usually occurs when matchers are mixed with raw values when recording a method:
foo(5, eq(6)); // wrong
You need to use no matcher at all or a matcher for every single param:
foo(eq(5), eq(6)); // right
foo(5, 6); // also right....

The matchers are correct (individually works). I insert one parameter. But when I run the entire package, and debug inside Easymock, it enters in a for loop. Inside it it puts the same matcher twice in the method. and appears this error,

Some clue?

 
Zack Mccraken
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nop, the exception is:

ava.lang.IllegalStateException: 1 matchers expected, 2 recorded.
 
Henri Tremblay
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you provide a complete example?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic