Exemple #1
0
 public void ModuloTesting()
 {
     Assert.AreEqual(-2, PrimeCalculatorUtilities.Modulo(10, -3));
     Assert.AreEqual(-3, PrimeCalculatorUtilities.Modulo(12, -5));
     Assert.AreEqual(15, PrimeCalculatorUtilities.Modulo(-4, 19));
     Assert.AreEqual(0, PrimeCalculatorUtilities.Modulo(7, 7));
     Assert.AreEqual(1, PrimeCalculatorUtilities.Modulo(1, 4));
 }
Exemple #2
0
 public void PowerModuloTesting()
 {
     Assert.AreEqual(60, PrimeCalculatorUtilities.PowerModulo(500, 400, 134));
     Assert.AreEqual(109, PrimeCalculatorUtilities.PowerModulo(29, 2, 122));
     Assert.AreEqual(1, PrimeCalculatorUtilities.PowerModulo(57, 80, 8));
 }