Beispiel #1
0
        public void TriangleTest2()
        {
            var triangle = new Triangle()
            {
                SideA = 2, SideB = 2, SideC = 2
            };

            Assert.AreEqual(triangle.Square(), Math.Sqrt(3));
        }
Beispiel #2
0
        public void TriangleTest6()
        {
            var triangle = new Triangle()
            {
                SideA = 3, SideB = 4, SideC = 8
            };

            try
            {
                triangle.Square();
            }
            catch (ArgumentException)
            {
                Assert.Pass();
            }

            Assert.Fail();
        }
Beispiel #3
0
        public void TriangleTest1()
        {
            var triangle = new Triangle();

            Assert.AreEqual(triangle.Square(), 0);
        }