package com.dano.test1.questionnaire

import org.junit.Assert.assertEquals
import org.junit.Test

class AnswerKeyUtilsTest {

    @Test
    fun roomQuestionId_formatsStableKey() {
        assertEquals("q1-age", AnswerKeyUtils.roomQuestionId("q1", "age"))
    }

    @Test
    fun lookupKey_stripsQuestionnairePrefix() {
        assertEquals("age", AnswerKeyUtils.lookupKey("questionnaire_1", "questionnaire_1-age"))
    }

    @Test
    fun lookupKey_usesShortSuffix() {
        assertEquals("q9", AnswerKeyUtils.lookupKey("questionnaire_1", "q9"))
    }
}
