diff --git a/app/src/test/kotlin/fr/free/nrw/commons/quiz/QuizQuestionTest.kt b/app/src/test/kotlin/fr/free/nrw/commons/quiz/QuizQuestionTest.kt index 580f146ae..6c6b25420 100644 --- a/app/src/test/kotlin/fr/free/nrw/commons/quiz/QuizQuestionTest.kt +++ b/app/src/test/kotlin/fr/free/nrw/commons/quiz/QuizQuestionTest.kt @@ -17,34 +17,34 @@ class QuizQuestionTest { @Mock private lateinit var quizQuestion: QuizQuestion - private val QUESTION_NUM_SAMPLE_VALUE = 1 - private val QUESTION_SAMPLE_VALUE = "Is this picture OK to upload?" - private val QUESTION_URL_SAMPLE_VALUE_ONE = "https://i.imgur.com/0fMYcpM.jpg" - private val QUESTION_URL_SAMPLE_VALUE_TWO = "https://example.com" - private val IS_ANSWER_SAMPLE_VALUE = false - private val ANSWER_MESSAGE_SAMPLE_VALUE = "Continue" + private val questionNumSampleValue = 1 + private val questionSampleValue = "Is this picture OK to upload?" + private val questionUrlSampleValueOne = "https://i.imgur.com/0fMYcpM.jpg" + private val questionUrlSampleValueTwo = "https://example.com" + private val isAnswerSampleValue = false + private val answerMessageSampleValue = "Continue" @Before fun setup() { MockitoAnnotations.openMocks(this) quizQuestion = QuizQuestion( - QUESTION_NUM_SAMPLE_VALUE, - QUESTION_SAMPLE_VALUE, - QUESTION_URL_SAMPLE_VALUE_ONE, - IS_ANSWER_SAMPLE_VALUE, - ANSWER_MESSAGE_SAMPLE_VALUE, + questionNumSampleValue, + questionSampleValue, + questionUrlSampleValueOne, + isAnswerSampleValue, + answerMessageSampleValue, ) } @Test fun testGetUrl() { - assertEquals(quizQuestion.getUrl(), Uri.parse(QUESTION_URL_SAMPLE_VALUE_ONE)) + assertEquals(quizQuestion.getUrl(), Uri.parse(questionUrlSampleValueOne)) } @Test fun testSetUrl() { - quizQuestion.setUrl(QUESTION_URL_SAMPLE_VALUE_TWO) - assertEquals(quizQuestion.getUrl(), Uri.parse(QUESTION_URL_SAMPLE_VALUE_TWO)) + quizQuestion.setUrl(questionUrlSampleValueTwo) + assertEquals(quizQuestion.getUrl(), Uri.parse(questionUrlSampleValueTwo)) } }