public void TestSingle() { var value = new[] { 0 }; var enumerable = new AggregateEnumerable <int>(value); Assert.AreEqual(1, enumerable.Count()); Assert.AreEqual(0, enumerable.ToArray()[0]); }
public void TestMultiple() { var value = new[] { 0 }; var empty = Array.Empty <int>(); var set = new HashSet <int>(new [] { 1, 2 }); var enumerable = new AggregateEnumerable <int>(value, empty, set); Assert.AreEqual(3, enumerable.Count()); var values = enumerable.ToArray(); Assert.AreEqual(0, values[0]); Assert.AreEqual(1, values[1]); Assert.AreEqual(2, values[2]); }