public void TestFactorial_7() { TextReader cin = Console.In; int factor = YourTaskHere.factorial(7); Assert.AreEqual(factor, 5040); }
public void TestLINQer() { int[] numbers = { 1, 2, 3, 4, 5, 15, 12 }; // sum = 42, middle = 42/7 = 6, > 6: 15, 12 IEnumerable <int> bigger_than_middle = YourTaskHere.LINQer(numbers); IEnumerator <int> answer = bigger_than_middle.GetEnumerator(); Assert.AreEqual(answer.Current, 0); answer.MoveNext(); Assert.AreEqual(answer.Current, 15); answer.MoveNext(); Assert.AreEqual(answer.Current, 12); answer.MoveNext(); Assert.AreEqual(answer.Current, 0); }