Last active
April 24, 2017 11:50
-
-
Save Tirael/4c9e3f4470ff601a6b32cc840bc76921 to your computer and use it in GitHub Desktop.
Auto-mocking an IObservable pushes a value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/nsubstitute/NSubstitute/issues/210#issuecomment-158282595 | |
foo.WhenStuffHappened.Returns(Observable.Return(5)); | |
// or | |
foo.WhenStuffHappened.Returns(Observable.Empty()); | |
// or | |
foo.WhenStuffHappened.Returns(Observable.Throws(new Exception("Die"))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment