API for telling mocks from other objects
Brought to you by:
tammofreese
There should be an API call that can tell whether an Object is an EasyMock mock and what type is mocked by the object. This can be important for logging failures in larger test suites, and other purposes. I suggest adding Class EasyMock.mockedClass(Object mock) and IMocksControl.getMocks() .
While you are at it: it would also be nice if there was an API for telling whether the mock is nice, strict or normal. Probably you would need to provide a method to get the mocks control, and adding isStrict and isNice to IMocksControl.