Created
October 24, 2012 17:23
-
-
Save MikeBild/3947466 to your computer and use it in GitHub Desktop.
Simple Rx Testing without Mocks
This file contains 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
var expected = new long[] {0, 1, 2, 3, 4}; | |
var actual = new List<long>(); | |
var scheduler = new TestScheduler(); | |
var interval = Observable.Interval(TimeSpan.FromSeconds(1), scheduler).Take(5); | |
interval.Subscribe(actual.Add); | |
scheduler.Start(); | |
CollectionAssert.AreEqual(expected, actual); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment