public void Basic() { var list = new List <int>(); var up = new UnicastSubject <int>(); var ts = up.Do(v => { list.Add(v); }) .DoAfterNext(v => { list.Add(-v); }) .Test(); up.EmitAll(1, 2, 3, 4, 5); ts.AssertResult(1, 2, 3, 4, 5); Assert.AreEqual(new List <int>() { 1, -1, 2, -2, 3, -3, 4, -4, 5, -5 }, list); }