コード例 #1
0
            //TestCase5
            ///all the values are different and this is also scalene triangle.
            public void Analyze_Triangle_Input_5_7_3_ExpectedOutput_Scalene()
            {
                // Arrange
                int a = 5;
                int b = 7;
                int c = 3;

                // Act
                string result = Trianglesolver.Analyze(a, b, c);

                //Assert
                Assert.AreEqual("Triangle is Scalene", result);
            }
コード例 #2
0
            //TestCase3
            ///sideA=2,sideB=2 and sideC=4 it so, this is Isosceles triangle.
            public void Analyze_Triangle_Input_4_4_4_ExpectedOutput_Isosceles()
            {
                // Arrange
                int a = 4;
                int b = 4;
                int c = 4;

                // Act
                string result = Trianglesolver.Analyze(a, b, c);

                //Assert
                Assert.AreEqual("Triangle is Equilateral", result);
            }
コード例 #3
0
            //TestCase 1
            ///first test case i am inputting sideA=2,sideB=3 and sideC=700.
            ///so this is not a triangle because side3 has value 600 so a triangle does not have too high value on one side only.
            public void Analyze_Triangle_Input_2_3_700_ExpectedOutput_NotTriangle()
            {
                // Arrange
                int a = 2;
                int b = 3;
                int c = 700;

                // Act
                string result = Trianglesolver.Analyze(a, b, c);

                //Assert
                Assert.AreEqual("This is not a Triangle", result);
            }
コード例 #4
0
        public void Analyze_input5and4and4_expectedoutputIsosceles()
        {
            //arrange
            int s1 = 5;
            int s2 = 4;
            int s3 = 4;

            //Act
            string r1 = "isosceles";
            string r2 = Trianglesolver.Analyze(s1, s2, s3);


            Assert.AreEqual(r2, r1);
        }
コード例 #5
0
        public void Analyze_input3and3and3_expectedoutputIEquilateral()
        {
            //arrange
            int s1 = 4;
            int s2 = 3;
            int s3 = 3;

            //Act
            string r1 = "isosceles";
            string r2 = Trianglesolver.Analyze(s1, s2, s3);


            Assert.AreEqual(r2, r1);
        }
コード例 #6
0
        public void Analyze_input4and3and5_expectedoutputScalene()
        {
            //arrange
            int s1 = 4;
            int s2 = 3;
            int s3 = 5;

            //Act
            string r1 = "scalene";
            string r2 = Trianglesolver.Analyze(s1, s2, s3);


            Assert.AreEqual(r2, r1);
        }
コード例 #7
0
        public void Analyze_input8and9and611_expectedoutputnotavalidtriangle()
        {
            //arrange
            int s1 = 8;
            int s2 = 9;
            int s3 = 611;

            //Act
            string r1 = "not a valid triangle";
            string r2 = Trianglesolver.Analyze(s1, s2, s3);


            Assert.AreEqual(r2, r1);
        }