org.powermock.modules.junit4.legacy.internal.impl.testcaseworkaround
Class PowerMockJUnit4LegacyTestMethodRunner

java.lang.Object
  extended by org.junit.internal.runners.BeforeAndAfterRunner
      extended by org.junit.internal.runners.TestMethodRunner
          extended by org.powermock.modules.junit4.legacy.internal.impl.testcaseworkaround.PowerMockJUnit4LegacyTestMethodRunner

public class PowerMockJUnit4LegacyTestMethodRunner
extends org.junit.internal.runners.TestMethodRunner

This class is needed because the test method runner creates a new instance of a TestIntrospector in its constructor. The TestIntrospector needs to be changed in order to support methods not annotated with Test to avoid NPE's.

This class also executes the setUp and tearDown methods if the test case extends TestCase. Another thing it does is to invoke all PowerMock test listeners for events.


Constructor Summary
PowerMockJUnit4LegacyTestMethodRunner(Object test, Method method, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description, PowerMockTestNotifier powerMockTestNotifier)
           
 
Method Summary
 void run()
           
protected  void runUnprotected()
           
 
Methods inherited from class org.junit.internal.runners.TestMethodRunner
addFailure, executeMethodBody
 
Methods inherited from class org.junit.internal.runners.BeforeAndAfterRunner
runProtected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PowerMockJUnit4LegacyTestMethodRunner

public PowerMockJUnit4LegacyTestMethodRunner(Object test,
                                             Method method,
                                             org.junit.runner.notification.RunNotifier notifier,
                                             org.junit.runner.Description description,
                                             PowerMockTestNotifier powerMockTestNotifier)
Method Detail

run

public void run()
Overrides:
run in class org.junit.internal.runners.TestMethodRunner

runUnprotected

protected void runUnprotected()
Overrides:
runUnprotected in class org.junit.internal.runners.TestMethodRunner


Copyright © 2007-2014. All Rights Reserved.