playframework / playframework/play1
PowerMock support
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 671
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
I try to test with PowerMock with these dependencies:
- org.mockito -> mockito-core 2.23.4
- org.powermock -> powermock-module-junit4 1.7.4
- org.powermock -> powermock-core 1.7.4
- org.powermock -> powermock-api-mockito2 1.7.4
and this code:
@RunWith(PowerMockRunner.class)
public class ContextProcessorUtilsTest extends UnitTest{
@Test
@PrepareOnlyThisForTest(ContextProcessorUtils.class)
public void getSessionTriggers() {
PowerMockito.mockStatic(ContextProcessorUtils.class);
}
}
and this:
@RunWith(PowerMockRunner.class)
@PrepareForTest(ContextProcessorUtils.class)
public class ContextProcessorUtilsTest extends UnitTest{
@Test
public void getSessionTriggers() {
PowerMockito.mockStatic(ContextProcessorUtils.class);
}
}
and the error:
A java.lang.ClassNotFoundException has been caught, utils.ContextProcessorUtilsTest
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported test with mockito-core 2.23.4, PowerMock 1.7.4, PowerMockRunner, and ContextProcessorUtils. Read the resulting ClassNotFoundException for ContextProcessorUtilsTest and investigate the project's test integration; done should clarify whether PowerMock can be supported and what compatibility or usage guidance is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100