Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: BaseObserver.assertNothing #5693

Closed
arturdryomov opened this issue Oct 27, 2017 · 5 comments
Closed

2.x: BaseObserver.assertNothing #5693

arturdryomov opened this issue Oct 27, 2017 · 5 comments

Comments

@arturdryomov
Copy link
Contributor

Just want to piggyback on #5555.

assertOnlyValues became very useful in our team, basically freeing us from writing multiple tests to check that the stream emitted values and, at the same time, did not produce errors or completion.

assertNothing should do pretty much the same thing as assertOnlyValues being an alias to other checks.

public final U assertNothing() {
    return assertSubscribed()
        .assertNoValues
        .assertNoErrors()
        .assertNotComplete();
}
@vanniktech
Copy link
Collaborator

Can't you use assertResult()?

@arturdryomov
Copy link
Contributor Author

Not exactly, we want to check that nothing was emitted, no error and no complete were passed as well.

@vanniktech
Copy link
Collaborator

Ah okay got it. Didn't see the assertNotComplete. I like the idea. I'm +1 for the operator.

@akarnokd
Copy link
Member

It is called assertEmpty.

@arturdryomov
Copy link
Contributor Author

Great, thanks! I guess we learn something every day :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants