During suite tests EasyMock says 0 matchers expected 1 recorded

前端 未结 6 1056
走了就别回头了
走了就别回头了 2021-02-19 00:42

So I\'ve been using EasyMock\'s class extension for a while now. All of a sudden I\'m getting this exception, but only when I run the entire test suite:

java.lan         


        
6条回答
  •  南方客
    南方客 (楼主)
    2021-02-19 00:59

    I had the same error message. I was (accidentally) using an isA() declaration in the call on the class under test

    I.e.

    classUnderTest.callStateChanged(calls, isA(LoggingOnlyListener.class));
    

    when I meant:

    classUnderTest.callStateChanged(calls, new LoggingOnlyListener());
    

    And it was the test AFTER this one that failed every time.

提交回复
热议问题