public class SystemPropertiesInvariantRule
extends java.lang.Object
implements org.junit.rules.TestRule
TestRule that ensures system properties remain unmodified by the nested
Statement. This can be applied both at suite level and at test level.
This rule requires appropriate security permission to read and write
system properties (System.getProperties()) if running under a security
manager.SystemPropertiesRestoreRule,
ClassRule,
Rule| Constructor and Description |
|---|
SystemPropertiesInvariantRule()
Cares about all properties.
|
SystemPropertiesInvariantRule(java.util.Set<java.lang.String> ignoredProperties)
Don't care about the given set of properties.
|
SystemPropertiesInvariantRule(java.lang.String... ignoredProperties)
Don't care about the given set of properties.
|
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement s,
org.junit.runner.Description d) |
public SystemPropertiesInvariantRule()
public SystemPropertiesInvariantRule(java.lang.String... ignoredProperties)
public SystemPropertiesInvariantRule(java.util.Set<java.lang.String> ignoredProperties)
Copyright © 2011–2018 Carrot Search s.c.. All rights reserved.