-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34a3923
commit b02b133
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,18 @@ | |
import java.time.OffsetDateTime; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import org.junit.jupiter.api.MethodOrderer; | ||
import org.junit.jupiter.api.Order; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestMethodOrder; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.CsvSource; | ||
|
||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class) | ||
class GQLApplicationIntegrationTest extends AbstractIntegrationTest { | ||
|
||
@Test | ||
@Order(1) | ||
void allAuthors() { | ||
graphQlTester | ||
.documentName("allAuthors") | ||
|
@@ -33,6 +38,7 @@ void allAuthors() { | |
.hasSize(4); | ||
} | ||
|
||
@Order(2) | ||
@ParameterizedTest | ||
@CsvSource({ | ||
"[email protected], first name1, last name1, Title1", | ||
|
@@ -67,6 +73,7 @@ void findAuthorByEmailId(String email, String firstName, String lastName, String | |
.hasSize(3); | ||
} | ||
|
||
@Order(3) | ||
@Test | ||
void createAuthor() { | ||
Map<String, Object> inputValues = new HashMap<>(); | ||
|
@@ -94,6 +101,7 @@ void createAuthor() { | |
} | ||
|
||
@Test | ||
@Order(4) | ||
void createPost() { | ||
Map<String, Object> inputValues = new HashMap<>(); | ||
inputValues.put("title", "JunitTitle"); | ||
|
@@ -129,6 +137,8 @@ void createPost() { | |
} | ||
|
||
@Test | ||
@Order(5) | ||
// adding ordering to make sure others are not failed | ||
void addCommentToPost() { | ||
PostCommentRequest postCommentRequest = | ||
new PostCommentRequest("JunitTitle", "JunitContent", 1L, true); | ||
|