Example #1
0
        public void IsRightTest_ex()
        {
            //Arrange
            Triangle_3s testTriangle_3s = new Triangle_3s();

            double[] values = { 1, 10, 5 };

            //Act /Assert
            var ex = Assert.Throws <ArgumentException>(() => testTriangle_3s.CalculateArea(values));

            Assert.That(ex.Message, Is.EqualTo("This is not a valid triangle"));
        }
Example #2
0
        public void CalculateAreaTest()
        {
            //Arrange
            Triangle_3s testTriangle_3s = new Triangle_3s();

            double[] values = { 3, 4, 5 };

            //Act
            double result = testTriangle_3s.CalculateArea(values);

            //Assert
            Assert.IsTrue(result == 6);
        }