We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f9c92a commit 8a551f2Copy full SHA for 8a551f2
tests/languages/android/ServiceTest.kt
@@ -27,6 +27,8 @@ import java.io.IOException
27
import java.nio.file.Files
28
import java.nio.file.Paths
29
30
+data class TestPayload(val response: String)
31
+
32
@Config(manifest=Config.NONE)
33
@RunWith(AndroidJUnit4::class)
34
class ServiceTest {
@@ -61,8 +63,8 @@ class ServiceTest {
61
63
val realtime = Realtime(client)
62
64
var realtimeResponse = "Realtime failed!"
65
- realtime.subscribe("tests") {
- realtimeResponse = it["response"]!! as String
66
+ realtime.subscribe("tests", payloadType = TestPayload::class.java) {
67
+ realtimeResponse = it.payload.response
68
}
69
70
runBlocking {
0 commit comments