Esempio n. 1
0
        public void TestTask1_2()
        {
            Point   x         = new Point(1, 3);
            Point   y         = new Point(5, 1);
            Task1_2 rectangle = new Task1_2(x, y);

            Assert.AreEqual(rectangle.Square, 8);
            Assert.AreEqual(rectangle.Perimeter, 12);
        }
        public void TestMethod1()
        {
            double X        = 1;
            double expected = 0;

            Task1_2 two    = new Task1_2(X);
            double  actual = two.ResultTask();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 3
0
        public void AlgorithmEuclideanTime_GetTimeParam_NUnit(params int[] numbers)
        {
            //Arrange
            TimeSpan timeSpan = new TimeSpan();

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

            //Assert
            Assert.IsTrue(timeSpan.Seconds <= 1, $"Time is {timeSpan.ToString()}");
        }
Esempio n. 4
0
        public void AlgorithmEuclideanTime_GetTimeTwoNumber_NUnit(int number1, int number2)
        {
            //Arrange
            TimeSpan timeSpan = new TimeSpan();

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

            //Assert
            Assert.IsTrue(timeSpan.Seconds <= 1, $"Time is {timeSpan.ToString()}");
        }
Esempio n. 5
0
 public void AlgorithmStein_InputNull_NUnit()
 {
     //Assert
     Assert.Throws <ArgumentNullException>(() => Task1_2.GcdSteinNative(null));
 }
Esempio n. 6
0
 public int AlgorithmStein_InputCorrentValuesTwoNumber_NUnit(int number1, int number2)
 {
     //Assert
     return(Task1_2.GcdSteinNative(number1, number2));
 }
Esempio n. 7
0
 public int AlgorithmStein_InputCorrentValuesParams_NUnit(params int[] numbers)
 {
     //Assert
     return(Task1_2.GcdSteinNative(numbers));
 }