ServiceManagementRestTest.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:drinkwater-java 作者:
@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);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号