marked Mockup Exams with (MOCKUP)

This commit is contained in:
anhefti 2019-11-18 09:13:40 +01:00
parent 1ef8c3602a
commit 4e6225b803
3 changed files with 13 additions and 13 deletions

View file

@ -59,29 +59,29 @@ final class MockupLmsAPITemplate implements LmsAPITemplate {
final LmsType lmsType = lmsSetup.getLmsType();
this.mockups = new ArrayList<>();
this.mockups.add(new QuizData(
"quiz1", institutionId, lmsSetupId, lmsType, "Demo Quiz 1", "Demo Quiz Mockup",
"quiz1", institutionId, lmsSetupId, lmsType, "Demo Quiz 1 (MOCKUP)", "Demo Quiz Mockup",
"2020-01-01T09:00:00Z", "2021-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz2", institutionId, lmsSetupId, lmsType, "Demo Quiz 2", "Demo Quiz Mockup",
"quiz2", institutionId, lmsSetupId, lmsType, "Demo Quiz 2 (MOCKUP)", "Demo Quiz Mockup",
"2020-01-01T09:00:00Z", "2021-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz3", institutionId, lmsSetupId, lmsType, "Demo Quiz 3", "Demo Quiz Mockup",
"quiz3", institutionId, lmsSetupId, lmsType, "Demo Quiz 3 (MOCKUP)", "Demo Quiz Mockup",
"2018-07-30T09:00:00Z", "2018-08-01T00:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz4", institutionId, lmsSetupId, lmsType, "Demo Quiz 4", "Demo Quiz Mockup",
"quiz4", institutionId, lmsSetupId, lmsType, "Demo Quiz 4 (MOCKUP)", "Demo Quiz Mockup",
"2018-01-01T00:00:00Z", "2019-01-01T00:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz5", institutionId, lmsSetupId, lmsType, "Demo Quiz 5", "Demo Quiz Mockup",
"quiz5", institutionId, lmsSetupId, lmsType, "Demo Quiz 5 (MOCKUP)", "Demo Quiz Mockup",
"2018-01-01T09:00:00Z", "2021-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz6", institutionId, lmsSetupId, lmsType, "Demo Quiz 6", "Demo Quiz Mockup",
"quiz6", institutionId, lmsSetupId, lmsType, "Demo Quiz 6 (MOCKUP)", "Demo Quiz Mockup",
"2019-01-01T09:00:00Z", "2021-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz7", institutionId, lmsSetupId, lmsType, "Demo Quiz 7", "Demo Quiz Mockup",
"quiz7", institutionId, lmsSetupId, lmsType, "Demo Quiz 7 (MOCKUP)", "Demo Quiz Mockup",
"2018-01-01T09:00:00Z", "2021-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz10", institutionId, lmsSetupId, lmsType, "Demo Quiz 10",
"quiz10", institutionId, lmsSetupId, lmsType, "Demo Quiz 10 (MOCKUP)",
"Starts in a minute and ends after five minutes",
DateTime.now(DateTimeZone.UTC).plus(Constants.MINUTE_IN_MILLIS)
.toString(Constants.DEFAULT_DATE_TIME_FORMAT),

View file

@ -674,7 +674,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
assertFalse(quizzes.isEmpty());
final QuizData quizData = quizzes.content.get(0);
assertNotNull(quizData);
assertEquals("Demo Quiz 1", quizData.name);
assertEquals("Demo Quiz 1 (MOCKUP)", quizData.name);
// import quiz as exam
final Result<Exam> newExamResult = restService
@ -688,7 +688,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
assertFalse(newExamResult.hasError());
final Exam newExam = newExamResult.get();
assertEquals("Demo Quiz 1", newExam.name);
assertEquals("Demo Quiz 1 (MOCKUP)", newExam.name);
assertEquals(ExamType.UNDEFINED, newExam.type);
assertFalse(newExam.supporter.isEmpty());
@ -753,7 +753,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
final List<EntityName> exams = examNamesResult.get();
assertFalse(exams.isEmpty());
final EntityName examName = exams.get(0);
assertEquals("Demo Quiz 1", examName.name);
assertEquals("Demo Quiz 1 (MOCKUP)", examName.name);
final Result<Exam> examResult = restService
.getBuilder(GetExam.class)

View file

@ -63,7 +63,7 @@ public class SebConnectionTest extends ExamAPIIntegrationTester {
assertTrue(HttpStatus.OK.value() == createConnection.getStatus());
final String contentAsString = createConnection.getContentAsString();
assertEquals(
"[{\"examId\":\"2\",\"name\":\"Demo Quiz 6\",\"url\":\"http://lms.mockup.com/api/\",\"lmsType\":\"MOCKUP\"}]",
"[{\"examId\":\"2\",\"name\":\"Demo Quiz 6 (MOCKUP)\",\"url\":\"http://lms.mockup.com/api/\",\"lmsType\":\"MOCKUP\"}]",
contentAsString);
// check connection token
@ -111,7 +111,7 @@ public class SebConnectionTest extends ExamAPIIntegrationTester {
assertTrue(HttpStatus.OK.value() == createConnection.getStatus());
final String contentAsString = createConnection.getContentAsString();
assertEquals(
"[{\"examId\":\"2\",\"name\":\"Demo Quiz 6\",\"url\":\"http://lms.mockup.com/api/\",\"lmsType\":\"MOCKUP\"}]",
"[{\"examId\":\"2\",\"name\":\"Demo Quiz 6 (MOCKUP)\",\"url\":\"http://lms.mockup.com/api/\",\"lmsType\":\"MOCKUP\"}]",
contentAsString);
// check connection token