improve error messages of unit tests

This commit is contained in:
Sebastian Sdorra
2012-02-01 16:20:43 +01:00
parent 7834e57c29
commit c608187eab
11 changed files with 44 additions and 34 deletions

View File

@@ -103,7 +103,7 @@ public class RepositorySimplePermissionITCase
ClientResponse response = wr.post(ClientResponse.class, repository);
assertNotNull(response);
assertTrue(response.getStatus() == 201);
assertEquals(response.getStatus(), 201);
String repositoryUrl = response.getHeaders().getFirst("Location");
@@ -112,7 +112,7 @@ public class RepositorySimplePermissionITCase
wr = client.resource(repositoryUrl);
response = wr.get(ClientResponse.class);
assertNotNull(response);
assertTrue(response.getStatus() == 200);
assertEquals(response.getStatus(), 200);
repository = response.getEntity(Repository.class);
assertNotNull(repository);
REPOSITORY_UUID = repository.getId();
@@ -148,7 +148,7 @@ public class RepositorySimplePermissionITCase
if (!credentials.isAnonymous())
{
assertNotNull(response);
assertTrue(response.getStatus() == 200);
assertEquals(response.getStatus(), 200);
Collection<Repository> repositories =
response.getEntity(new GenericType<Collection<Repository>>() {}
@@ -172,7 +172,7 @@ public class RepositorySimplePermissionITCase
if (!credentials.isAnonymous())
{
assertNotNull(response);
assertTrue(response.getStatus() == 403);
assertEquals(response.getStatus(), 403);
response.close();
}
}