Mocking a concrete class using EasyMock

后端 未结 5 1651
别跟我提以往
别跟我提以往 2021-01-18 06:15

Is it possible to mock a concrete class using EaskMock? If so, how do I do it?

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-18 06:54

    See the EasyMock Class Extension documentation and download it from the SourceForge project. You can't mock final methods though.

    EDIT: This is now part of EasyMock for v3 and above, as noted in comments.

提交回复
热议问题