Ejemplo n.º 1
0
        public void Checktriangle()
        {
            //arrange
            float width     = 90;
            float height    = 100;
            float hypotenus = 110;
            bool  expected  = true;

            //act
            Graphical_PL_Application.Triangle tangle = new Graphical_PL_Application.Triangle();
            tangle.GetValues(width, height, hypotenus, 0);

            //assert
            bool actual = tangle.checkTriangleValidity();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void TestDrawTriangle()
        {
            try
            {
                float width     = 75;
                float height    = 90;
                float hypotenus = 80;

                Graphical_PL_Application.Triangle tangle = new Graphical_PL_Application.Triangle();
                tangle.GetValues(width, height, hypotenus, 0);

                Assert.IsTrue(true);
            }
            catch
            {
                Assert.IsTrue(false);
            }
        }