Example #1
0
 public void EvenShouldPrintVariableSequenceOfNumbers()
 {
     EvenNumbers even = new EvenNumbers();
     int input = 8;
     int[] expected = new int[] { 2, 4, 6, 8, 10, 12, 14, 16 };
     int[] actual = even.GetSequence(input);
     CollectionAssert.AreEqual(expected, actual);
 }
Example #2
0
 public void EvenPrintSequenceOfNumbers()
 {
     EvenNumbers even = new EvenNumbers();
     int length = 7;
     string expected = "2 4 6 8 10 12 14";
     string actual = even.ToString(even.GetSequence(length));
     Assert.AreEqual(expected, actual);
 }