I'm writing a test to check the behaviour of my subscriber. I have a method like that:
public void myMethod(){
myObservable.subscribe(result -> {
count++;
})
}
I want to test that myMethod increments count variable when result is emmited, but because count is incremented asynchronously, I need to wait until result is emmited to check count status. How can I do that?
Aucun commentaire:
Enregistrer un commentaire