Class SystemPropertiesRule
- java.lang.Object
-
- uk.org.webcompere.systemstubs.resource.SingularTestResource
-
- uk.org.webcompere.systemstubs.properties.SystemPropertiesImpl<SystemPropertiesRule>
-
- uk.org.webcompere.systemstubs.rules.SystemPropertiesRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule,Executable,NameValuePairSetter<SystemPropertiesRule>,TestResource,SystemStubTestRule
public class SystemPropertiesRule extends SystemPropertiesImpl<SystemPropertiesRule> implements SystemStubTestRule
Returns the system properties to their original state around each test block. Provides the ability for properties to be prepared before the test starts, viaSystemPropertiesImpl.set(java.lang.String, java.lang.String).- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description SystemPropertiesRule()Default constructor provides restoration of propertiesSystemPropertiesRule(String name, String value, String... nameValues)SystemPropertiesRule(Properties properties)Construct with some properties to apply when active
-
Method Summary
-
Methods inherited from class uk.org.webcompere.systemstubs.properties.SystemPropertiesImpl
doSetup, doTeardown, remove, set
-
Methods inherited from class uk.org.webcompere.systemstubs.resource.SingularTestResource
isActive, setup, teardown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.org.webcompere.systemstubs.resource.Executable
execute
-
Methods inherited from interface uk.org.webcompere.systemstubs.resource.NameValuePairSetter
set, set
-
Methods inherited from interface uk.org.webcompere.systemstubs.rules.internal.SystemStubTestRule
apply
-
Methods inherited from interface uk.org.webcompere.systemstubs.resource.TestResource
execute, setup, teardown
-
-
-
-
Constructor Detail
-
SystemPropertiesRule
public SystemPropertiesRule()
Default constructor provides restoration of properties
-
SystemPropertiesRule
public SystemPropertiesRule(Properties properties)
Construct with some properties to apply when active- Parameters:
properties- system properties to apply when active
-
-