public void TestEuclidGCDMax() { //arrange int[] valueException = { Int32.MaxValue, Int32.MinValue }; //assert Assert.ThrowsException <ArgumentException>(() => GCD.EuclidGCD(valueException)); }
public void TestEuclidGCDRandThird() { //arrange int[] value = { 7, 9, 13, 23, 28, 12, 12 }; //act long val = GCD.EuclidGCD(value); //assert Assert.AreEqual(1, val); }
public void TestEuclidGCDRandSecond() { //arrange int[] value = { 3, 6, 9, 12, 15, 18 }; //act long val = GCD.EuclidGCD(value); //assert Assert.AreEqual(3, val); }
public void TestEuclidGCDRandFirst() { //arrange int[] value = { 5, 10, 15 }; //act long val = GCD.EuclidGCD(value); //assert Assert.AreEqual(5, val); }
public void TestEuclidGCDZero() { //arrange int[] value = { 0, 0, 0, 0 }; //act long val = GCD.EuclidGCD(value); //assert Assert.AreEqual(0, val); }
public int EucideanTests_FiveElementsValidData_ValidResult(int first, int second, int third, int four, int five) { return(GCD.EuclidGCD(out _, first, second, third, four, five)); }
public int EucideanTests_ThreeElementsValidData_ValidResult(int first, int second, int third) { return(GCD.EuclidGCD(out _, first, second, third)); }
public void EucideanTests_EmptyArray_ArgumentNullException() => Assert.Throws(typeof(ArgumentNullException), () => GCD.EuclidGCD(out _, null));
public void EucideanTests_LessThenThowElements_ArgumentException() => Assert.Throws(typeof(ArgumentException), () => GCD.EuclidGCD(out _, 1));