예제 #1
0
 public void MixArray_ShouldBe_5()
 {
     Assert.AreEqual(5, FindTheOddInt.find_it(new[] { 20, 1, -1, 2, -2, 3, 3, 5, 5, 1, 2, 4, 20, 4, -1, -2, 5 }));
 }
예제 #2
0
 public void PureArray_ShouldBe_1()
 {
     Assert.AreEqual(1, FindTheOddInt.find_it(new[] { 1, 1, 1, 1, 1, 1, 1 }));
 }
예제 #3
0
 public void OneNumArray_ShouldBe_0()
 {
     Assert.AreEqual(0, FindTheOddInt.find_it(new[] { 0 }));
 }
예제 #4
0
 public void MixArray_ShouldBe_Minus1()
 {
     Assert.AreEqual(-1, FindTheOddInt.find_it(new[] { -1, 1, -1, -1, -1, -1, 1 }));
 }