Loading ...
Sorry, an error occurred while loading the content.

1654nice mocks: verify a call does not happen

Expand Messages
  • Chris Wright
    Dec 7, 2011
      I'm using easymock in a project, and for various reasons I'm using a
      nice mock in a particular test. However, I want to make sure that a
      particular call never happens.

      I tried calling:

      But easymock complained about this.

      The most succinct way I found of doing this is:
      expect(myobj.call()).andAnswer(new IAnswer<Object>() { public Object
      answer() throws Throwable { Assert.fail(); return null; } });

      Is there any easier way?
    • Show all 2 messages in this topic