gwt-test-utils / gwt-test-utils

gwt-test-utils is a Java framework that allows to test GWT client side code in a efficient, easy way
124 stars 49 forks source link

"NodeList with generic type" bug #95

Open nbartels opened 4 years ago

nbartels commented 4 years ago

The PR shows how to reproduce this bug. Only the last commit is relevant, the other ones are already submitted, but not merged by @Gael 😞

The problem can be described like this: You have in your project a class that you have to mock for some reason and this class has a method with a NodeList as input parameter. The NodeList may have a generic parameter. If the method in your class has the generic type in its signature, the complete class cannot be mocked. If you remove the generic type from the NodeList parameter everything is fine and runs.

In this test case, I used the Mockito#mock(), but this behaviour can be seen on the @Mock annotation, too.

I'm afraid this can also be a problem for other classes, so we should fix this. I try to work on this, but maybe someone else has the same problem and may join to solve it. 😄