Mocking a concrete class using EasyMock

后端 未结 5 1700
别跟我提以往
别跟我提以往 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:50

    When creating a mock, simply use the org.easymock.classextension version of the EasyMock class. The result will be castable.

    Here's a recent link - http://easymock.org/EasyMock3_2_ClassExtension_Documentation.html

提交回复
热议问题