@@ -20,8 +20,8 @@ import ai.tock.bot.connector.web.WebMessageProcessor
2020import ai.tock.bot.connector.web.send.QuickReply
2121import ai.tock.bot.engine.action.SendSentence
2222import ai.tock.bot.engine.user.PlayerId
23- import org.junit.Test
24- import org.junit.jupiter.api.Assertions
23+ import org.junit.jupiter.api.Assertions.assertEquals
24+ import org.junit.jupiter.api.Test
2525
2626class WebMessageProcessorTest {
2727 private val markdownText = " Hello *user*"
@@ -32,15 +32,15 @@ class WebMessageProcessorTest {
3232 val playerId = PlayerId (" " )
3333 val action = SendSentence (playerId, " " , playerId, markdownText)
3434 val messageProcessor = WebMessageProcessor (false )
35- Assertions . assertEquals(WebMessage (markdownText), messageProcessor.process(action))
35+ assertEquals(WebMessage (markdownText, actionId = action.id.toString() ), messageProcessor.process(action))
3636 }
3737
3838 @Test
3939 fun `simple web messages get rendered as HTML when markdown is enabled` () {
4040 val playerId = PlayerId (" " )
4141 val action = SendSentence (playerId, " " , playerId, markdownText)
4242 val messageProcessor = WebMessageProcessor (true )
43- Assertions . assertEquals(WebMessage (renderedText), messageProcessor.process(action))
43+ assertEquals(WebMessage (renderedText, actionId = action.id.toString() ), messageProcessor.process(action))
4444 }
4545
4646 @Test
@@ -49,6 +49,6 @@ class WebMessageProcessorTest {
4949 val quickReplies = listOf (QuickReply (" QR" , null , null ))
5050 val action = SendSentence (playerId, " " , playerId, null , mutableListOf (WebMessage (markdownText, quickReplies)))
5151 val messageProcessor = WebMessageProcessor (true )
52- Assertions . assertEquals(WebMessage (renderedText, quickReplies), messageProcessor.process(action))
52+ assertEquals(WebMessage (renderedText, quickReplies, actionId = action.id.toString() ), messageProcessor.process(action))
5353 }
5454}
0 commit comments