Example #1
0
 public void OddShouldPrintFirstNumber()
 {
     OddNumbers odd = new mathmagician.OddNumbers();
     int expected = 1;
     int actual = odd.GetFirst();
     Assert.AreEqual(expected, actual);
 }
Example #2
0
 public void OddShouldPrintVariableSequenceOfNumbers()
 {
     OddNumbers odd = new mathmagician.OddNumbers();
     int input = 8;
     int[] expected = new int[] { 1, 3, 5, 7, 9, 11, 13, 15 };
     int[] actual = odd.GetSequence(input);
     CollectionAssert.AreEqual(expected, actual);
 }
Example #3
0
 public void OddShouldPrintNextNumber()
 {
     OddNumbers odd = new mathmagician.OddNumbers();
     int input = 3;
     int expected = 5;
     int actual = odd.GetNext(input);
     Assert.AreEqual(expected, actual);
 }
Example #4
0
 public void OddPrintSequenceOfNumbers()
 {
     OddNumbers odd = new mathmagician.OddNumbers();
     int length = 7;
     string expected = "1 3 5 7 9 11 13";
     string actual = odd.ToString(odd.GetSequence(length));
     Assert.AreEqual(expected, actual);
 }
Example #5
0
 public void OddEnsureICanCreateClassInstance()
 {
     OddNumbers odd = new mathmagician.OddNumbers();
     Assert.IsNotNull(odd);
 }