public void Next1() { var subSet = new SubsetFromList(new int[] { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 }, 5); var firstSubSet = subSet.Get(); Assert.AreEqual(new int[] { 10, 20, 30, 40, 50 }, firstSubSet); var count = 1; while (subSet.Next()) { count++; } Assert.AreEqual(252, count); }
public void Next2() { var subSet = new SubsetFromList(new int[] { 9, 8, 2, 12, 7, 16, 17 }, 3); var firstSubSet = subSet.Get(); Assert.AreEqual(new int[] { 9, 8, 2 }, firstSubSet); var count = 1; while (subSet.Next()) { count++; } Assert.AreEqual(35, count); }