During suite tests EasyMock says 0 matchers expected 1 recorded

前端 未结 6 1069
走了就别回头了
走了就别回头了 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 01:05

    I just ran into this problem, and I think I managed to figure it out. For me it was due the the previous test (that's in a different Class), where I was (incorrectly) using an EasyMock matcher in an Assert.assertEquals method.

    It seems EasyMock couldn't complain about the extra matcher reported until the first expects methods was called.

提交回复
热议问题