Mock Objects in Unit Tests
Subject:   How is mocquer different from "EasyMock Class Extension"?
Date:   2005-01-13 08:50:05
From:   dkarr
How is Mocquer different from the "EasyMock Class Extension"? The intent appears to be the same, but I haven't seen the details of the latter. I see that the Mocquer project appears to be approximately 6 weeks old, but the EasyMock Class Extension was released 6 months ago.
Full Threads Newest First

Showing messages 1 through 2 of 2.

  • How is mocquer different from "EasyMock Class Extension"?
    2005-01-13 19:31:13  lujian213 [View]

    Yes, the intent is almost the same. They both intent to mock java class.

    EasyMock Class Extention does this based on CGLIB project which can create proxy for both class and interface at runtime.

    Mocquer is a sub project of Dunamis project. It is a specific application to demonstrate the usage of Dunamis which can create dynamic delegation for both class and interfaces.

    I can't tell which one is better now. I think the difference is two different implementations for the same goal.
    • How is mocquer different from "EasyMock Class Extension"?
      2005-01-16 05:02:05  Stucki [View]

      Well, there is a difference:

      EasyMock Class Extension (resp. the cglib) has a problem if the constructor of the mocked class calls a method (net.sf.cglib.core.CodeGenerationException: java.lang.NullPointerException-->null).

      Mocquer does not seem to have any problems with that.