Examples of newPostRequest()


Examples of org.sonar.server.ws.WsTester.newPostRequest()

    RestartHandler restartHandler = new RestartHandler(settings, platform, system);
    SystemWs ws = new SystemWs(restartHandler);

    WsTester tester = new WsTester(ws);
    tester.newPostRequest("api/system", "restart").execute();

    verify(platform).restart();
  }

  @Test
View Full Code Here

Examples of org.sonar.server.ws.WsTester.newPostRequest()

    RestartHandler restartHandler = new RestartHandler(settings, platform, system);
    SystemWs ws = new SystemWs(restartHandler);

    WsTester tester = new WsTester(ws);
    try {
      tester.newPostRequest("api/system", "restart").execute();
      fail();
    } catch (ForbiddenException e) {
      verifyZeroInteractions(platform);
    }
  }
View Full Code Here

Examples of org.sonar.server.ws.WsTester.newPostRequest()

    RestartHandler restartHandler = new RestartHandler(settings, platform, system);
    SystemWs ws = new SystemWs(restartHandler);

    WsTester tester = new WsTester(ws);
    try {
      tester.newPostRequest("api/system", "restart").execute();
      fail();
    } catch (ForbiddenException e) {
      verifyZeroInteractions(platform);
    }
  }
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.