Ejemplo n.º 1
0
        private void btmTriArea_Click(object sender, EventArgs e)
        {
            int a = Convert.ToInt32(txtTriA.Text);
            int b = Convert.ToInt32(txtTriB.Text);
            int c = Convert.ToInt32(txtTriC.Text);

            lblTriArea.Text = Triangle.TriArea(a, b, c).ToString("0.##");
        }
Ejemplo n.º 2
0
        public void TriAreaTest2()
        {
            TriangleArea triangle      = new TriangleArea();
            double       x             = 7;
            double       y             = 9;
            double       z             = 11;
            double       expectedValue = 24;
            double       actualValue   = triangle.TriArea(x, y, z);

            Assert.AreNotEqual(expectedValue, actualValue);
        }
Ejemplo n.º 3
0
        public void TriAreaTest()
        {
            TriangleArea triangle      = new TriangleArea();
            double       x             = 6;
            double       y             = 8;
            double       z             = 10;
            double       expectedValue = 24;
            double       actualValue   = triangle.TriArea(x, y, z);

            Assert.AreEqual(expectedValue, actualValue);
        }