Interface Environment

All Known Implementing Classes:
SystemEnvironment

public interface Environment
An interface through which we can get environment variable values. Allows for easy mocking of the System class, which is notoriously hard to mock out for unit tests.
  • Method Summary

    Modifier and Type
    Method
    Description
    getenv(String propertyName)
    Gets the value of a given environment variable.
    getProperty(String propertyName)
    Gets a system property
  • Method Details

    • getenv

      String getenv(String propertyName)
      Gets the value of a given environment variable.
    • getProperty

      String getProperty(String propertyName)
      Gets a system property