I ran into this question that has been asked 3 years ago:

jMock Mocking Classes and Interface

My question is how can you jmock classes that are not interfaces? As far as I know, class jmocking can happen only with @Mock anotation, represented in JMock version which to this day is not yet stable.

有帮助吗?

解决方案

jMock cookbook has an entry for you.

Here is the link: http://www.jmock.org/mocking-classes.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top