public class SystemPropertiesRestoreRule extends Object implements 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(Set<String> ignoredProperties) |
SystemPropertiesRestoreRule(String... ignoredProperties) |
public SystemPropertiesRestoreRule()
public SystemPropertiesRestoreRule(Set<String> ignoredProperties)
ignoredProperties - Properties that will be ignored (and will not be restored).public SystemPropertiesRestoreRule(String... ignoredProperties)
ignoredProperties - Properties that will be ignored (and will not be restored).public Statement apply(Statement s, Description d)
Copyright © 2011-2015 Carrot Search s.c.. All Rights Reserved.