コード例 #1
0
 public Form1()
 {
     InitializeComponent();
     Rectangle  = new RectangleArea();
     Triangle   = new TriangleArea();
     Circle     = new CircleArea();
     Quadratic  = new CalcQuadratic();
     Polynomial = new CalcPolynomial();
 }
コード例 #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);
        }
コード例 #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);
        }