KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Once I add the RunWith annotation, that is @RunWith(PowerMockRunner.class) the Spring Autowire does not work anymore! class B { @Autowire SessionFactory session; } @RunWith(PowerMockRunner.class) @PrepareForTest{SomeClass.class} class Testing { @Test methodA(){ //mehod } @Test methodD(){ } } Now, method A makes a call to class B, but due to RunWith(PowerMockRunner) annotation, the Autowiring is not working. Any help would be greatly appreciated!
Tags (comma-separated)
Save Edits
Cancel