-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
183 additions
and
37 deletions.
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
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
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
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,6 +8,8 @@ | |
import com.github.jsonzou.jmockdata.MockConfig; | ||
import com.quemistry.quiz_ms.client.model.MCQDto; | ||
import com.quemistry.quiz_ms.client.model.RetrieveMCQResponse; | ||
import com.quemistry.quiz_ms.client.model.SearchStudentResponse; | ||
import com.quemistry.quiz_ms.client.model.SearchStudentResponse.StudentResponse; | ||
import com.quemistry.quiz_ms.model.*; | ||
import java.util.List; | ||
|
||
|
@@ -18,6 +20,9 @@ public class TestFixture { | |
public static final Integer CURRENT_OPTION_NO = 1; | ||
|
||
public static final String STUDENT_ID = "student Id"; | ||
public static final String STUDENT_FIRST_NAME = "Ce"; | ||
public static final String STUDENT_LAST_NAME = "Shi Ren"; | ||
public static final String STUDENT_NAME = "Ce Shi Ren"; | ||
public static final String TUTOR_ID = "tutor Id"; | ||
public static final String TEST_TITLE = "test title"; | ||
|
||
|
@@ -29,8 +34,26 @@ public class TestFixture { | |
|
||
public static final UserContext studentContext = | ||
new UserContext(STUDENT_ID, "[email protected]", "student"); | ||
public static final UserContext tutorContext = | ||
new UserContext(TUTOR_ID, "[email protected]", "tutor"); | ||
public static final StudentResponse STUDENT_RESPONSE = | ||
StudentResponse.builder() | ||
.id(1L) | ||
.firstName(STUDENT_FIRST_NAME) | ||
.lastName(STUDENT_LAST_NAME) | ||
.email("[email protected]") | ||
.accountId(STUDENT_ID) | ||
.build(); | ||
|
||
public static final SearchStudentResponse SEARCH_STUDENT_RESPONSE = | ||
SearchStudentResponse.builder() | ||
.statusCode("200") | ||
.statusMessage("Success") | ||
.serviceName("quiz-service") | ||
.payload(List.of(STUDENT_RESPONSE)) | ||
.build(); | ||
|
||
public static final String TUTOR_EMAIL = "[email protected]"; | ||
public static final String TUTOR_ROLE = "tutor"; | ||
public static final UserContext tutorContext = new UserContext(TUTOR_ID, TUTOR_EMAIL, TUTOR_ROLE); | ||
|
||
public static final TestEntity testEntity = | ||
TestEntity.builder().id(TEST_ID).tutorId(TUTOR_ID).status(DRAFT).title(TEST_TITLE).build(); | ||
|
Oops, something went wrong.