You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: app/src/androidTest/java/kotlinx/coroutines/experimental/firebase/android/app/DatabaseReferenceIntegrationTest.kt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,19 @@ class DatabaseReferenceIntegrationTest : BaseIntegrationTest() {
23
23
24
24
val firstMessageNode = messagesNode.child("1")
25
25
val secondMessageNode = messagesNode.child("2")
26
+
val thirdMessageNode = messagesNode.child("3")
26
27
27
28
try {
28
29
firstMessageNode.saveValue("Call Mary tomorrow morning")
29
30
secondMessageNode.saveValue("See the new TV show season")
31
+
thirdMessageNode.saveValue("Spread Kotlin word")
30
32
31
33
val first = firstMessageNode.readValue<String>()
32
34
val second = secondMessageNode.readValue(String::class.java)
35
+
val third = messagesNode.orderByValue().limitToFirst(1).readList<String>()
33
36
37
+
assertThat(third.size, `is`(equalTo(1)))
38
+
assertThat(third[0], `is`(equalTo("Call Mary tomorrow morning")))
34
39
assertThat(first, `is`(equalTo("Call Mary tomorrow morning")))
35
40
assertThat(second, `is`(equalTo("See the new TV show season")))
Copy file name to clipboardExpand all lines: kotlinx-coroutines-firebase-android/src/main/java/kotlinx/coroutines/experimental/firebase/android/DatabaseReference.kt
0 commit comments