public void SearchByStein_ArrayLengthLessThanTwo_ThrowsArgumentExceptions(params long[] nums) { var ex = Assert.Catch <ArgumentException>(() => FindGCD.SearchByEuclid(nums)); StringAssert.Contains("Value does not fall within the expected range.", ex.Message); }
public void SearchByStein_LeftNumGreaterThenRight_ReturnsGCD(long a, long b, long expectedRes) { long gcd = FindGCD.SearchByStein(a, b); Assert.AreEqual(expectedRes, gcd); }
public void SearchByStein_GoodNums_ReturnsGCD(long expectedRes, params long[] nums) { long gcd = FindGCD.SearchByStein(nums); Assert.AreEqual(expectedRes, gcd); }
public void SearchByEuclid_ThreeParams_ReturnsGCD(long a, long b, long c, long expectedRes) { long gcd = FindGCD.SearchByEuclid(a, b, c); Assert.AreEqual(expectedRes, gcd); }