Closed
Description
Hi
At first, My English is not good. forgive me.
I have a question.
Below is RxScala code but there should not be any problem about this question.
val subscriber = TestSubscriber[Int]
val subjectA = BehaviorSuject[Int](1)
subjectA.filter(_ > 1).subscribe(subscriber)
subscriber.assertNoValues()
subjectA.onNext(1)
subscriber.assertNoValues()
subjectA.onNext(2)
subscriber.assertValue(2)
// subscriber.virtualMethodThatClearInnerValues()
subjectA.onNext(1)
subscriber.assertNoValues() // failed
subscriber.assertValues(2) // passed
My question is "How can I test that there is no output?".
Currently, last assertion is passed with subscriber.assertValue(2)
but not subscriber.assertNoValues()
.
Do you have any idea?
Thanks for reading.