示例#1
0
 public int GreatestCommonDivisor_ShouldCalculate(int first, int second)
 {
     return(NumberTheory.GreatestCommonDivisor(first, second));
 }
示例#2
0
 public int GreatestCommonDivisor_ShouldCalculate_GivenNegativeValues(int first, int second)
 {
     return(NumberTheory.GreatestCommonDivisor(first, second));
 }
示例#3
0
 public void Having_some_negatives_then_if_it_happens_it_should_be_positive(int numerator, int denomator, int expectedResult)
 {
     Assert.AreEqual(expectedResult, NumberTheory.GreatestCommonDivisor(numerator, denomator));
 }
示例#4
0
 public void Common_factor(int numerator, int denomator, int expectedResult)
 {
     Assert.AreEqual(expectedResult, NumberTheory.GreatestCommonDivisor(numerator, denomator));
 }
示例#5
0
 public void One_is_the_multiple_of_the_other(int numerator, int denomator, int expectedResult)
 {
     Assert.AreEqual(expectedResult, NumberTheory.GreatestCommonDivisor(numerator, denomator));
 }
示例#6
0
 public void Reflexive_a_number_for_itself(int numerator, int denomator, int expectedResult)
 {
     Assert.AreEqual(expectedResult, NumberTheory.GreatestCommonDivisor(numerator, denomator));
 }
示例#7
0
 public void GreatestCommonDivisor(int a, int b, int result)
 {
     Assert.That(NumberTheory.GreatestCommonDivisor(a, b), Is.EqualTo(result));
 }