I use for my test cases the JMockit framework. If I mock an interface, test 
cases with such mocks doesn't run anymore with EclEmma (without they are 
working fine). I get an exception: java.lang.UnsupportedOperationException: 
class redefinition failed: attempted to change the schema (add/remove fields).

Example:

public final class InterfaceMockTest {


    @Test
    public void test() throws SQLException {
        MockUp<PreparedStatement> mock = new MockUp<PreparedStatement>() {
            @Mock
            public void setString(int parameterIndex, String x) {
                System.out.println(x);
            }
        };


        mock.getMockInstance().setString(1, "example");
    }


}

I use EclEmma 4.3.2 as Eclipse plug-in. How can I make my tests with JMockit 
mocks running by EclEmma? Originally I have posted in the JMockit use group: 
https://groups.google.com/forum/#!topic/jmockit-users/Jzhxpt6MkMQ. There I have 
received the answer that JMockit doesn't add or remove any fields but JaCoCo 
does.

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/1e732770-d3c4-46cf-88bb-4572dc1e816f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to