Examples of envVariables()


Examples of org.sonar.api.utils.System2.envVariables()

  }

  @Test
  public void override_env_variables() {
    System2 system = mock(System2.class);
    when(system.envVariables()).thenReturn(ImmutableMap.of("JAVA_HOME", "/default/path/to/java"));

    Command command = new Command("java", system);
    command.setEnvironmentVariable("JAVA_HOME", "/new/path/to/java");
    assertThat(command.getEnvironmentVariables().get("JAVA_HOME")).isEqualTo("/new/path/to/java");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.