org.powermock.modules.testng
Class PowerMockTestCase

java.lang.Object
  extended by org.powermock.modules.testng.PowerMockTestCase

public class PowerMockTestCase
extends Object

A PowerMock base class that may be used as a base class for all TestNG test cases that uses PowerMock.


Constructor Summary
PowerMockTestCase()
           
 
Method Summary
protected  void afterPowerMockTestClass()
           
protected  void afterPowerMockTestMethod()
          Must be executed after each test method.
protected  void beforePowerMockTestClass()
           
protected  void beforePowerMockTestMethod()
          Must be executed before each test method.
 org.testng.IObjectFactory create(org.testng.ITestContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PowerMockTestCase

public PowerMockTestCase()
Method Detail

beforePowerMockTestClass

protected void beforePowerMockTestClass()
                                 throws Exception
Throws:
Exception

afterPowerMockTestClass

protected void afterPowerMockTestClass()
                                throws Exception
Throws:
Exception

beforePowerMockTestMethod

protected void beforePowerMockTestMethod()
                                  throws Exception
Must be executed before each test method. This method does the following:
  1. Injects all mock fields (if they haven't been injected already)

Throws:
Exception - If something unexpected goes wrong.

afterPowerMockTestMethod

protected void afterPowerMockTestMethod()
                                 throws Exception
Must be executed after each test method. This method does the following:
  1. Clear all injection fields (those annotated with a Mock annotation)
  2. Clears the PowerMock MockRepository

Throws:
Exception - If something unexpected goes wrong.

create

public org.testng.IObjectFactory create(org.testng.ITestContext context)
Returns:
The PowerMock object factory.


Copyright © 2007-2012. All Rights Reserved.