commonTest.subscription.TestSubscriptionEvent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of instantsearch-core Show documentation
Show all versions of instantsearch-core Show documentation
InstantSearch Android is a library providing widgets and helpers to help you build the best instant-search experience on Android with Algolia. It is built on top of Algolia's Kotlin API Client to provide you a high-level solution to quickly build various search interfaces.
package subscription
import com.algolia.instantsearch.core.subscription.SubscriptionEvent
import shouldEqual
import kotlin.test.Test
class TestSubscriptionEvent {
private val value = "value"
@Test
fun sendValueShouldCallSubscription() {
var expected: String? = null
val item: SubscriptionEvent = SubscriptionEvent()
item.subscribe { expected = it }
item.send(value)
expected shouldEqual value
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy