From ba9217d8363df45c871d92afa205de37dc6a4103 Mon Sep 17 00:00:00 2001 From: Tyson Gern Date: Sat, 13 Apr 2024 20:07:36 -0600 Subject: [PATCH] Add test for message provider --- .../streaming/messages/MessageProviderTest.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/kotlin/test/initialcapacity/streaming/messages/MessageProviderTest.kt diff --git a/src/test/kotlin/test/initialcapacity/streaming/messages/MessageProviderTest.kt b/src/test/kotlin/test/initialcapacity/streaming/messages/MessageProviderTest.kt new file mode 100644 index 0000000..e50a161 --- /dev/null +++ b/src/test/kotlin/test/initialcapacity/streaming/messages/MessageProviderTest.kt @@ -0,0 +1,17 @@ +package test.initialcapacity.streaming.messages + +import io.initialcapacity.streaming.messages.MessageProvider +import kotlinx.coroutines.runBlocking +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.time.Duration + +class MessageProviderTest { + @Test + fun testFetchAll() = runBlocking { + assertEquals( + listOf("Here's some slow content.", "It took a while to load.", "And didn't use any javascript."), + MessageProvider(Duration.ZERO).fetchAll() + ) + } +} \ No newline at end of file