@Test
public void shouldStartAndStopService() throws UnirestException {
httpPostRequestString(MANAGEMENT_API_ENDPOINT + "/stopservice?serviceName=test", "")
.expectsBody("Service test stopped")
.expectsStatus(200);
httpGetString(MANAGEMENT_API_ENDPOINT + "/ServiceState?serviceName=test")
.expectsBody("Stopped")
.expectsStatus(200);
httpPostRequestString(MANAGEMENT_API_ENDPOINT + "/startservice?serviceName=test", "")
.expectsBody("Service test started")
.expectsStatus(200);
httpGetString(MANAGEMENT_API_ENDPOINT + "/ServiceState?serviceName=test")
.expectsBody("Up")
.expectsStatus(200);
}
ServiceManagementRestTest.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:drinkwater-java
作者:
评论列表
文章目录