public void TestCalm2() { CellSink <int> c = new CellSink <int>(2); List <int> @out = new List <int>(); using (Transaction.Run(() => c.Calm().Listen(@out.Add))) { c.Send(4); c.Send(2); c.Send(4); c.Send(4); c.Send(2); c.Send(2); } CollectionAssert.AreEqual(new[] { 2, 4, 2, 4, 2 }, @out); }
public void TestCalm2() { CellSink<int> c = new CellSink<int>(2); List<int> @out = new List<int>(); using (Transaction.Run(() => c.Calm().Listen(@out.Add))) { c.Send(4); c.Send(2); c.Send(4); c.Send(4); c.Send(2); c.Send(2); } CollectionAssert.AreEqual(new[] { 2, 4, 2, 4, 2 }, @out); }