コード例 #1
0
        public void AlgorithmSteinTime_GetTimeParam_NUnit(params int[] numbers)
        {
            //Arrange
            TimeSpan timeSpan = new TimeSpan();

            //Act
            int result = Task1_2.GcdSteinNative(out timeSpan, numbers);

            //Assert
            Assert.IsTrue(timeSpan.Seconds <= 1, $"Time is {timeSpan.ToString()}");
        }
コード例 #2
0
        public void AlgorithmSteinTime_GetTimeTwoNumber_NUnit(int number1, int number2)
        {
            //Arrange
            TimeSpan timeSpan = new TimeSpan();

            //Act
            int result = Task1_2.GcdSteinNative(out timeSpan, number1, number2);

            //Assert
            Assert.IsTrue(timeSpan.Seconds <= 1, $"Time is {timeSpan.ToString()}");
        }
コード例 #3
0
 public void AlgorithmStein_InputNull_NUnit()
 {
     //Assert
     Assert.Throws <ArgumentNullException>(() => Task1_2.GcdSteinNative(null));
 }
コード例 #4
0
 public int AlgorithmStein_InputCorrentValuesTwoNumber_NUnit(int number1, int number2)
 {
     //Assert
     return(Task1_2.GcdSteinNative(number1, number2));
 }
コード例 #5
0
 public int AlgorithmStein_InputCorrentValuesParams_NUnit(params int[] numbers)
 {
     //Assert
     return(Task1_2.GcdSteinNative(numbers));
 }