Skip to content

Commit

Permalink
add: MessageVisitorTest
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Aug 4, 2023
1 parent 7a685b0 commit 77af9ba
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ internal class MessageVisitorTest {
return arrayOf("visitFace") + super.visitFace(message, data)
}

override fun visitSuperFace(message: SuperFace, data: Unit): Array<String> {
return arrayOf("visitSuperFace") + super.visitSuperFace(message, data)
}

override fun visitFileMessage(message: FileMessage, data: Unit): Array<String> {
return arrayOf("visitFileMessage") + super.visitFileMessage(message, data)
}
Expand Down Expand Up @@ -290,6 +294,17 @@ internal class MessageVisitorTest {
FlashImage(createImage()).accept(GetCalledMethodNames)
)

assertContentEquals(
arrayOf(
"visitSuperFace",
"visitHummerMessage",
"visitMessageContent",
"visitSingleMessage",
"visitMessage",
),
FlashImage(createImage()).accept(GetCalledMethodNames)
)

assertContentEquals(
arrayOf(
"visitPokeMessage",
Expand Down

0 comments on commit 77af9ba

Please sign in to comment.