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 Details

    • EnvironmentRule

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

    • 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