Test messages change

This commit is contained in:
Mariusz Pacek committed 2018-03-17 17:42:51 +01:00
1 parent 794e14cf64
commit 842a700432
2 files changed
+8 -8

No files matched your search

@@ -15,7 +15,7 @@ public class ResultCodesTest {
public void errorResponseShouldBe404Test() {
ErrorResponse errorResponse = ResultCodes.fromCode(404);
assertTrue("Github error server 404 should be mapped on 404 error response", errorResponse.getStatusCode() == 404);
assertTrue("And description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
}
@@ -23,7 +23,7 @@ public class ResultCodesTest {
public void errorResponseShouldBe400Test() {
ErrorResponse errorResponse = ResultCodes.fromCode(403);
assertTrue("Github error server 403 should be mapped on 400 error response", errorResponse.getStatusCode() == 403);
assertTrue("And description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
}
@@ -31,7 +31,7 @@ public class ResultCodesTest {
public void errorResponseShouldBe500Test() {
ErrorResponse errorResponse = ResultCodes.fromCode(500);
assertTrue("Github error server 500 should be mapped on 500 error response", errorResponse.getStatusCode() == 500);
assertTrue("And description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
}
@Test
@@ -44,7 +44,7 @@ public class ResultCodesTest {
if (!notUsed.contains(i)) {
ErrorResponse errorResponse = ResultCodes.fromCode(i);
assertTrue("For error code: " + i + " ErrorResponse should be 500", errorResponse.getStatusCode() == 500);
assertTrue("And description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(errorResponse.getStatusDescription()));
}
}
}
@@ -81,7 +81,7 @@ public class IntegrationTest {
logResponse(receivedResponse);
assertTrue("Response should be OK for owner: " + GITHUB_OWNER + " and for repo: " + GIHTUB_REPO, receivedResponse.getStatusCode() == HttpResponseStatus.OK.code());
assertTrue("And description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
assertEquals(jsonExpected, response, true);
});
}
@@ -92,7 +92,7 @@ public class IntegrationTest {
ReceivedResponse receivedResponse = whenClientCall(httpClient, GIHTUB_REPO_NOT_FOUND);
assertTrue("Response should be NOT_FOUND for owner: " + GITHUB_OWNER + " and for repo: " + GIHTUB_REPO_NOT_FOUND, receivedResponse.getStatusCode() == HttpResponseStatus.NOT_FOUND.code());
assertTrue("And description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
});
}
@@ -103,7 +103,7 @@ public class IntegrationTest {
ReceivedResponse receivedResponse = whenClientCall(httpClient, GIHTUB_REPO);
assertTrue("Response should be for owner: " + GITHUB_OWNER + " and for repo: " + GIHTUB_REPO, receivedResponse.getStatusCode() == HttpResponseStatus.SERVICE_UNAVAILABLE.code());
assertTrue("And description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
});
}
@@ -113,7 +113,7 @@ public class IntegrationTest {
ReceivedResponse receivedResponse = whenClientCall(httpClient, GITHUB_REPO_TIMEOUT);
assertTrue("Response should be 504 for owner: " + GITHUB_OWNER + " and for repo: " + GITHUB_REPO_TIMEOUT, receivedResponse.getStatusCode() == HttpResponseStatus.GATEWAY_TIMEOUT.code());
assertTrue("And description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
assertTrue("Description should not be empty", StringUtils.isNotEmpty(receivedResponse.getBody().getText()));
});
}