Class EnvironmentRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class EnvironmentRule
    extends AbstractEnvironmentOverride<EnvironmentRule>
    implements org.junit.rules.TestRule
    TestRule for specifying environment ( System.getenv() ) for tests.
    Author:
    Daniel Sagenschneider
    • Constructor Detail

      • EnvironmentRule

        public EnvironmentRule​(java.lang.String... nameValuePairs)
        Instantiate.
        Parameters:
        nameValuePairs - Initial environment variable name/value pairs.
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule