public void Lockstep() { var dp1 = new DirectProcessor <int>(); var dp2 = new DirectProcessor <int>(); TestSubscriber <int> ts = dp1.Sample(dp2).Test(); ts.AssertEmpty(); dp1.OnNext(1); dp1.OnNext(2); dp2.OnNext(100); ts.AssertValues(2); dp2.OnNext(100); ts.AssertValues(2); dp1.OnNext(3); dp1.OnNext(4); dp2.OnNext(200); ts.AssertValues(2, 4); dp2.OnComplete(); ts.AssertResult(2, 4); Assert.IsFalse(dp1.HasSubscribers); Assert.IsFalse(dp2.HasSubscribers); }