QuizQuestionTest.kt: modified property names to camel case to meet ktlint standard

This commit is contained in:
tristan81 2024-09-18 20:23:57 +10:00
parent bc7c591e84
commit 1e5d26e5be

View file

@ -17,34 +17,34 @@ class QuizQuestionTest {
@Mock @Mock
private lateinit var quizQuestion: QuizQuestion private lateinit var quizQuestion: QuizQuestion
private val QUESTION_NUM_SAMPLE_VALUE = 1 private val questionNumSampleValue = 1
private val QUESTION_SAMPLE_VALUE = "Is this picture OK to upload?" private val questionSampleValue = "Is this picture OK to upload?"
private val QUESTION_URL_SAMPLE_VALUE_ONE = "https://i.imgur.com/0fMYcpM.jpg" private val questionUrlSampleValueOne = "https://i.imgur.com/0fMYcpM.jpg"
private val QUESTION_URL_SAMPLE_VALUE_TWO = "https://example.com" private val questionUrlSampleValueTwo = "https://example.com"
private val IS_ANSWER_SAMPLE_VALUE = false private val isAnswerSampleValue = false
private val ANSWER_MESSAGE_SAMPLE_VALUE = "Continue" private val answerMessageSampleValue = "Continue"
@Before @Before
fun setup() { fun setup() {
MockitoAnnotations.openMocks(this) MockitoAnnotations.openMocks(this)
quizQuestion = quizQuestion =
QuizQuestion( QuizQuestion(
QUESTION_NUM_SAMPLE_VALUE, questionNumSampleValue,
QUESTION_SAMPLE_VALUE, questionSampleValue,
QUESTION_URL_SAMPLE_VALUE_ONE, questionUrlSampleValueOne,
IS_ANSWER_SAMPLE_VALUE, isAnswerSampleValue,
ANSWER_MESSAGE_SAMPLE_VALUE, answerMessageSampleValue,
) )
} }
@Test @Test
fun testGetUrl() { fun testGetUrl() {
assertEquals(quizQuestion.getUrl(), Uri.parse(QUESTION_URL_SAMPLE_VALUE_ONE)) assertEquals(quizQuestion.getUrl(), Uri.parse(questionUrlSampleValueOne))
} }
@Test @Test
fun testSetUrl() { fun testSetUrl() {
quizQuestion.setUrl(QUESTION_URL_SAMPLE_VALUE_TWO) quizQuestion.setUrl(questionUrlSampleValueTwo)
assertEquals(quizQuestion.getUrl(), Uri.parse(QUESTION_URL_SAMPLE_VALUE_TWO)) assertEquals(quizQuestion.getUrl(), Uri.parse(questionUrlSampleValueTwo))
} }
} }