Closed GoogleCodeExporter closed 9 years ago
Looks like the field has been renamed to just "testClass" in JUnit 4.12.
Original comment by jrh...@gmail.com
on 12 Dec 2014 at 4:15
This should be changed to High priority since there is no way to run PowerMock
with JUnit 4.12.
Original comment by nykolas....@gmail.com
on 23 Dec 2014 at 6:31
Also, changing to JUnit 4.11 to workaround this problem causes another problem:
org.powermock.reflect.exceptions.FieldNotFoundException: No instance field
named "fAnnotations" could be found in the class hierarchy of
org.junit.runner.Description.
Original comment by nykolas....@gmail.com
on 23 Dec 2014 at 6:35
Original comment by johan.ha...@gmail.com
on 3 Jan 2015 at 8:12
In https://github.com/junit-team/junit/releases, the version is 4.12-SNAPSHOT.
Hence the fix
static {
if(JUnitVersion.isGreaterThanOrEqualTo("4.12")) {
TEST_CLASS_FIELD = "testClass";
CLASS_UNDER_TEST_FIELD = "klass";
ERRORS_FIELD = "errors";
}
else {
TEST_CLASS_FIELD = "fTestClass";
CLASS_UNDER_TEST_FIELD = "fClass";
ERRORS_FIELD = "fErrors";
}
}
doesn't apply to this version as JUnitVersion.isGreaterThanOrEqualTo("4.12")
gives false in this case.
Original comment by reshm...@gmail.com
on 11 Feb 2015 at 2:59
Any update? This is still not fixed with latest version of junit and
PowerMock.
Original comment by roa.sig...@gmail.com
on 30 Mar 2015 at 5:30
JUnit 4.12 and powermock 1.6.2 not working. Please provide us fix to move ahead.
Original comment by pundir.f...@gmail.com
on 1 Apr 2015 at 5:35
Please change the status from 'fixed' this issue still exists with junit-4.12
and Powermock-1.6.2.
Original comment by dandr...@gmail.com
on 1 Apr 2015 at 6:09
When using powermock-1.6.2 together with junit-4.12 I saw
org.powermock.reflect.exceptions.FieldNotFoundException: Field 'fTestClass' was
not found in class
Original comment by magicknifeV
on 15 Apr 2015 at 8:26
Original issue reported on code.google.com by
cheis...@squareup.com
on 5 Dec 2014 at 9:07