EasyMock set方法報錯: java.lang.AssertionError

有返回值的方法沒問題, 直接andReturn就好了.code

EasyMock.expect(info.getWebTitle()).andReturn(StringUtils.EMPTY).anyTimes();

對於set方法沒有返回值, 報錯AssertionError, 須要以下處理.blog

info.setSessionID(EasyMock.anyString());
相關文章
相關標籤/搜索