Package org.sonar.server.platform

Examples of org.sonar.server.platform.Platform


  private final List components = Lists.newArrayList(WsTester.class);
  private final Properties initialProps = new Properties();

  public ServerTester() {
    homeDir = createTempDir();
    platform = new Platform();

    clusterName = "cluster-" + System.currentTimeMillis();
    clusterPort = NetworkUtils.freePort();
    Properties properties = new Properties();
    properties.setProperty(ProcessConstants.CLUSTER_NAME, clusterName);
View Full Code Here


  System2 system = mock(System2.class);

  @Test
  public void restart_if_dev_mode() throws Exception {
    Platform platform = mock(Platform.class);
    Settings settings = new Settings();
    settings.setProperty("sonar.web.dev", true);
    when(system.isOsWindows()).thenReturn(false);

    RestartHandler restartHandler = new RestartHandler(settings, platform, system);
View Full Code Here

    verify(platform).restart();
  }

  @Test
  public void fail_if_production_mode() throws Exception {
    Platform platform = mock(Platform.class);
    Settings settings = new Settings();
    RestartHandler restartHandler = new RestartHandler(settings, platform, system);
    SystemWs ws = new SystemWs(restartHandler);

    WsTester tester = new WsTester(ws);
View Full Code Here

    }
  }

  @Test
  public void fail_if_windows_java_6() throws Exception {
    Platform platform = mock(Platform.class);
    Settings settings = new Settings();
    settings.setProperty("sonar.web.dev", true);
    when(system.isOsWindows()).thenReturn(true);
    when(system.isJavaAtLeast17()).thenReturn(false);
View Full Code Here

public class SystemWsTest {

  @Test
  public void define() throws Exception {
    Platform platform = mock(Platform.class);
    Settings settings = new Settings();
    RestartHandler restartHandler = new RestartHandler(settings, platform, mock(System2.class));
    SystemWs ws = new SystemWs(restartHandler);
    WebService.Context context = new WebService.Context();
View Full Code Here

TOP

Related Classes of org.sonar.server.platform.Platform

Copyright © 2018 www.massapicom. 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.