Comments (10)
Looks like the field has been renamed to just "testClass" in JUnit 4.12.
Original comment by [email protected]
on 12 Dec 2014 at 4:15
from powermock.
This should be changed to High priority since there is no way to run PowerMock
with JUnit 4.12.
Original comment by [email protected]
on 23 Dec 2014 at 6:31
from powermock.
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 [email protected]
on 23 Dec 2014 at 6:35
from powermock.
Original comment by [email protected]
on 3 Jan 2015 at 8:12
- Changed state: Fixed
from powermock.
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 [email protected]
on 11 Feb 2015 at 2:59
from powermock.
Any update? This is still not fixed with latest version of junit and
PowerMock.
Original comment by [email protected]
on 30 Mar 2015 at 5:30
from powermock.
JUnit 4.12 and powermock 1.6.2 not working. Please provide us fix to move ahead.
Original comment by [email protected]
on 1 Apr 2015 at 5:35
from powermock.
Please change the status from 'fixed' this issue still exists with junit-4.12
and Powermock-1.6.2.
Original comment by [email protected]
on 1 Apr 2015 at 6:09
from powermock.
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
from powermock.
this worked with 1.6.1 ?
Original comment by rogerpack2005
on 18 Jun 2015 at 3:30
from powermock.
Related Issues (20)
- Tests Classes cannot inherit another class if we want to use @PowerMockRunnerDelegate with a runner that extends ParentRunner HOT 1
- PowerMock doesn't work with JUnit 4.12 HOT 3
- java.lang.IllegalAccessError when using PowerMock 1.6.0 and Mockito 1.10.16 HOT 2
- Unable to verifyPrivate a method : maybe a bug in the withArguments method
- powermock throws loader constraint violation error:when resolving method "org.apache.log4j.LogManager.getLogger HOT 2
- Support for Dexmaker Android
- Powermock does not play well with java.time HOT 3
- Powermock agent dies with VerifyError
- Support PowerMock to run Android JUNIT tests HOT 2
- Fix in PowerMockMockito 1.6.1 doesn't work for junit 4.12 as version id is 4.12-SNAPSHOT
- Powermock affect the Unmarshal convert *.xml to *.class
- PowerMockito: Mocking two static methods of two different classes breaks the first mocked static method when the second mocked method is called HOT 1
- Changelog lies about "Fixed Mockito 1.10.9+ incompatibility"
- MockClassLoader#loadMockClass fails to preserve original ProtectionDomain of classes prepared for test
- PowerMockTestCase subclass test crashes
- Problem while mocking javax.ws.rs.core.Request object with Mockito.mock(Request.class)
- createMockAndExpectNew does not support collaborators with constructors with Array HOT 1
- Unable to mock final and private classes when using @PowerMockRunnerDelegate(PowerMockRunner.class)
- Problem with try without sentences HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powermock.