public void ShouldExample2Test1() { //Declare Input Array int[] arrayOfInts = new int[5] { 1, 2, 3, 4, 5 }; //Run Method ExampleMethods.Example2(arrayOfInts); }
public void ShouldExample2Test2() { //Declare Input Array int[] arrayOfInts = new int[200]; //Declare StringWriter to catch Console output for comparison var sw = new StringWriter(); Console.SetOut(sw); //Run Method ExampleMethods.Example2(arrayOfInts); string actualResult = sw.ToString(); //Each Line will be "0\n" for a total of 3 characters per line //200 values should result in a total result length of 600 characters Assert.AreEqual(actualResult.Length, 600); }