question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.x: BaseObserver.assertOnlyValues(T...)

See original GitHub issue

I’d like to introduce assertOnlyValues to the BaseObserver. It’s the counterpart to assertResult(T...) which does almost the same except for the fact that the type hasn’t completed yet.

I’m open if anyone has a better function name. Internally it’d delegate to:

  assertValues(values)
      .assertNoErrors()
      .assertNotComplete()
      .assertSubscribed();

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
akarnokdcommented, Aug 24, 2017

Okay, let’s add it.

I’d name it assertValuesOnly so it should show up right after assertValues in code completion.

0reactions
vanniktechcommented, Aug 24, 2017

For sure, I’m also pretty sure @vanniktech uses Kotlin so he could add extension function.

That’s what I’m doing right now. However I still think a lot of other people could benefit from this and the cost of adding this is really low.

Not a fan of naming though, but I see the pattern, assertOnlyValues() should fit test API design.

Open for any better name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.x: BaseObserver.assertNothing · Issue #5693 - GitHub
Just want to piggyback on #5555. assertOnlyValues became very useful in our team, basically freeing us from writing multiple tests to check ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found