public async void Take_EmitLatest() { await AsyncEnum.Interval(1, 5, TimeSpan.FromMilliseconds(200)) .Throttle(TimeSpan.FromMilliseconds(100), true) .Take(1) .AssertResult(1L); }
public async void Keep_All_EmitLast() { var t = 100; if (Environment.GetEnvironmentVariable("CI") != null) { t = 1000; } await AsyncEnum.Interval(1, 5, TimeSpan.FromMilliseconds(2 * t)) .Throttle(TimeSpan.FromMilliseconds(t), true) .AssertResult(1, 2, 3, 4, 5); }
public async void Range() { await AsyncEnum.Interval(1, 5, TimeSpan.FromMilliseconds(200), TimeSpan.FromMilliseconds(100)) .AssertResult(1, 2, 3, 4, 5); }
public async void Normal_initial() { await AsyncEnum.Interval(TimeSpan.FromMilliseconds(50), TimeSpan.FromMilliseconds(100)) .Take(5) .AssertResult(0, 1, 2, 3, 4); }