import Testing
@testable import 康康

struct HealthExportPromptTests {
    @Test func dialogueAnswerPromptContainsQuestionTranscriptAndData() {
        let prompt = HealthExportPrompts.dialogueAnswer(
            latestQuestion: "最近血压怎么样?",
            transcript: "患者: 最近头晕",
            dataJSON: #"{"indicators":[{"name":"收缩压"}],"diaries":[{"excerpt":"昨晚没睡好"}]}"#
        )

        #expect(prompt.contains("最近血压怎么样?"))
        #expect(prompt.contains("患者: 最近头晕"))
        #expect(prompt.contains("收缩压"))
        #expect(prompt.contains("昨晚没睡好"))
    }

    @Test func dialogueReportPromptContainsTranscriptAndFixedReportInstruction() {
        let prompt = HealthExportPrompts.dialogueReportGeneration(
            transcript: "患者: 帮我整理给医生\n康康: 已查看记录",
            dataJSON: #"{"indicators":[],"diaries":[]}"#
        )

        #expect(prompt.contains("多轮对话"))
        #expect(prompt.contains("帮我整理给医生"))
        #expect(prompt.contains("严格 Markdown"))
    }
}
