public void Calculate_TwoIntegerMinValues_ThrowArgumentOutOfRangeException() => Assert.Throws<ArgumentOutOfRangeException>(() => { var stopwatch = new Stopwatch(); IGcdAlgorithm gcdAlgorithm = new BinaryGcdAlgorithm(); gcdAlgorithm.CalculateGcdWithTime(int.MinValue, int.MinValue, new StopwatchAdapter(stopwatch), out _); } );
public void Calculate_TwoZeroesGiven_ThrowArgumentException() => Assert.Throws<ArgumentException>(() => { var stopwatch = new Stopwatch(); IGcdAlgorithm gcdAlgorithm = new BinaryGcdAlgorithm(); gcdAlgorithm.CalculateGcdWithTime(0, 0, new StopwatchAdapter(stopwatch), out _); } );
public int Calculate_TwoIntegersGiven_ReturnGCD(int first, int second) { var stopwatch = new Stopwatch(); IGcdAlgorithm gcdAlgorithm = new BinaryGcdAlgorithm(); return gcdAlgorithm.CalculateGcdWithTime(first, second, new StopwatchAdapter(stopwatch), out _); }