Interface SystemPropertySetter


  • public interface SystemPropertySetter
    Wrapper interface around System.setProperty(String, String) and System.clearProperty(String). Tests that modify system properties may provide custom implementations that keeps track of changes and restores original property values on test completion.
    • Method Detail

      • setProperty

        SystemPropertySetter setProperty​(java.lang.String key,
                                         @Nullable
                                         java.lang.String value)
        Updates the system property specified by key. If value is not null, System.setProperty(String, String) is invoked; otherwise System.clearProperty(String) is invoked.