Exemplo n.º 1
0
 public void MostRepeatedNumber_ArgumentNullException()
 {
     int[] numbers = null;
     Assert.ThrowsException <ArgumentNullException>(() => RepeatedNumber.MostRepeatedNumber(numbers));
 }
Exemplo n.º 2
0
 public void MostRepeatedNumber_WithTwoElements_Success()
 {
     int[] numbers = { 3, 3 };
     Assert.AreEqual(3, RepeatedNumber.MostRepeatedNumber(numbers));
 }
Exemplo n.º 3
0
 public void MostRepeatedNumber_NotRepeatedNumbers_Success()
 {
     int[] numbers = { 1, 3 };
     Assert.AreEqual(0, RepeatedNumber.MostRepeatedNumber(numbers));
 }
Exemplo n.º 4
0
 public void MostRepeatedNumber_Success()
 {
     int[] numbers = { 1, 10, 8, 9, 9, 10, 10 };
     Assert.AreEqual(10, RepeatedNumber.MostRepeatedNumber(numbers));
 }