public class SystemPropertiesRestoreRule
extends java.lang.Object
implements org.junit.rules.TestRule
TestRule which restores system properties from before the nested
Statement.
This rule requires appropriate security permission to read and write
system properties (System.getProperties()) if running under a security
manager.SystemPropertiesInvariantRule,
ClassRule,
Rule| Constructor and Description |
|---|
SystemPropertiesRestoreRule()
Restores all properties.
|
SystemPropertiesRestoreRule(java.util.Set<java.lang.String> ignoredProperties) |
SystemPropertiesRestoreRule(java.lang.String... ignoredProperties) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement s,
org.junit.runner.Description d) |
public SystemPropertiesRestoreRule()
public SystemPropertiesRestoreRule(java.util.Set<java.lang.String> ignoredProperties)
ignoredProperties - Properties that will be ignored (and will not be restored).public SystemPropertiesRestoreRule(java.lang.String... ignoredProperties)
ignoredProperties - Properties that will be ignored (and will not be restored).Copyright © 2011–2018 Carrot Search s.c.. All rights reserved.