org.mule.tck.junit4.rule
Class SystemProperty

java.lang.Object
  extended by org.junit.rules.ExternalResource
      extended by org.mule.tck.junit4.rule.SystemProperty
All Implemented Interfaces:
org.junit.rules.TestRule
Direct Known Subclasses:
DynamicPort

public class SystemProperty
extends org.junit.rules.ExternalResource

Sets up a system property before a test and guaranties to tear it down afterward.


Constructor Summary
SystemProperty(String name)
           
SystemProperty(String name, String value)
           
 
Method Summary
protected  void after()
           
protected  void before()
           
protected  void doCleanUp()
           
 String getName()
           
 String getValue()
           
protected  void restoreOldValue()
           
 
Methods inherited from class org.junit.rules.ExternalResource
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemProperty

public SystemProperty(String name)

SystemProperty

public SystemProperty(String name,
                      String value)
Method Detail

before

protected void before()
               throws Throwable
Overrides:
before in class org.junit.rules.ExternalResource
Throws:
Throwable

after

protected void after()
Overrides:
after in class org.junit.rules.ExternalResource

restoreOldValue

protected void restoreOldValue()

getName

public String getName()

doCleanUp

protected void doCleanUp()

getValue

public String getValue()


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.