Exemple #1
0
 public void EdgeTests()
 {
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { 0 }));
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { 1 }));
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { }));
 }
Exemple #2
0
 public void NegativeOddTests()
 {
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { 0, -1, 2 }));
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { 0, 1, -4 }));
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { -1023, -1, 3 }));
 }
Exemple #3
0
 public void NegativeEvenTests()
 {
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { 0, -1, -5 }));
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { 0, -1, -3 }));
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { -1023, 1, -2 }));
 }
Exemple #4
0
 public void OddTests()
 {
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { 0, 1, 2 }));
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { 0, 1, 4 }));
     Assert.Equal("odd", OddOrEven.ResolveWithoutLinq(new int[] { 1023, 1, 3 }));
 }
Exemple #5
0
 public void EvenTests()
 {
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { 0, 1, 5 }));
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { 0, 1, 3 }));
     Assert.Equal("even", OddOrEven.ResolveWithoutLinq(new int[] { 1023, 1, 2 }));
 }