Skip to content

Commit

Permalink
Assert value of debug message separately
Browse files Browse the repository at this point in the history
  • Loading branch information
Rkareko committed Sep 13, 2024
1 parent 7a862e7 commit 82c3590
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,11 @@ class WifiDirectDataSharingStrategyTest : RobolectricTest() {

coVerify { dataInputStream.readLong() }
coVerify { dataInputStream.read(any(), 0, bytePayload.size) }
coVerify { wifiDirectDataSharingStrategy invoke "logDebug" withArguments listOf("file size 0") }
val messageSlot = slot<String>()
coVerify {
wifiDirectDataSharingStrategy invoke "logDebug" withArguments listOf(capture(messageSlot))
}
Assert.assertEquals("file size 0", messageSlot.captured)

val bytePayloadSlot = slot<BytePayload>()
coVerify { payloadReceiptListener.onPayloadReceived(capture(bytePayloadSlot)) }
Expand Down

0 comments on commit 82c3590

Please sign in to comment.