示例#1
0
        public void FindNODRefactoredBenchmarkUTCTest(params int[] digits)
        {
            long timing = -1;

            NODCalculatesRefactored.FuncBenchmarkUTCTicks(() => { System.Threading.Thread.Sleep(10); return(NODCalculatesRefactored.CalculateNOD(FindNODType.Stein, digits)); }, out timing);
            Assert.That(timing >= 0);
        }
示例#2
0
        public void FindNODRefactoredBenchmarkTest(params int[] digits)
        {
            long timing = -1;

            NODCalculatesRefactored.FuncBenchmarkMilliSeconds(() => { System.Threading.Thread.Sleep(1000); return(NODCalculatesRefactored.CalculateNOD(FindNODType.Euclid, digits)); }, out timing);
            Assert.That(timing >= 1000);
        }
示例#3
0
 public void FindNODRefactoredTest_ArgumentOutOfRangeException(FindNODType findType, int a, int b)
 {
     Assert.That(() => NODCalculatesRefactored.CalculateNOD(findType, a, b), Throws.Exception.TypeOf <ArgumentOutOfRangeException>());
 }
示例#4
0
 public int FindNODRefactored_Params_Test(FindNODType findType, params int[] digits)
 {
     return(NODCalculatesRefactored.CalculateNOD(findType, digits));
 }
示例#5
0
 public int FindNODRefactoredTest(FindNODType findType, int a, int b)
 {
     return(NODCalculatesRefactored.CalculateNOD(findType, a, b));
 }