moved assertResponseIsNotEmpty and removed the duplication

This commit is contained in:
cnechifor
2016-09-29 11:29:46 +03:00
parent 2810e995d7
commit 45edd29f46
2 changed files with 3 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ public class RestDemoTest extends RestTest
// add new comment // add new comment
RestCommentModel commentEntry = commentsAPI.addComment(fileModel.getNodeRef(), "This is a new comment"); RestCommentModel commentEntry = commentsAPI.addComment(fileModel.getNodeRef(), "This is a new comment");
commentsAPI.getNodeComments(fileModel.getNodeRef()) commentsAPI.getNodeComments(fileModel.getNodeRef())
.assertThatResponseIsNotEmpty() .assertResponseIsNotEmpty()
.assertThatCommentWithIdExists(commentEntry.getId()) .assertThatCommentWithIdExists(commentEntry.getId())
.assertThatCommentWithContentExists("This is a new comment"); .assertThatCommentWithContentExists("This is a new comment");
@@ -86,7 +86,7 @@ public class RestDemoTest extends RestTest
commentEntry.getId(), commentEntry.getId(),
"This is the updated comment"); "This is the updated comment");
commentsAPI.getNodeComments(fileModel.getNodeRef()) commentsAPI.getNodeComments(fileModel.getNodeRef())
.assertThatResponseIsNotEmpty() .assertResponseIsNotEmpty()
.assertThatCommentWithIdExists(commentEntry.getId()) .assertThatCommentWithIdExists(commentEntry.getId())
.assertThatCommentWithContentExists("This is the updated comment"); .assertThatCommentWithContentExists("This is the updated comment");
} }

View File

@@ -63,7 +63,7 @@ public class SampleSitesTest extends RestTest
public void adminShouldAccessSites() throws JsonToModelConversionException, Exception public void adminShouldAccessSites() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSites() siteAPI.getSites()
.assertThatResponseIsNotEmpty(); .assertResponseIsNotEmpty();
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY, @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,