Example #1
0
        public void AddNewShapeTest()
        {
            //Arrange
            AreaCalculator calcTest     = new AreaCalculator();
            NewShape       newShapeTest = new NewShape();

            //Act /Assert
            Assert.True(calcTest.AddShape(newShapeTest) == true);
        }
Example #2
0
        public void AddExistingShapeTest()
        {
            //Arrange
            Circle         circleTest = new Circle();
            AreaCalculator calcTest   = new AreaCalculator();

            //Act /Assert
            Assert.True(calcTest.AddShape(circleTest) == false);
        }
Example #3
0
        public void CalculateTest()
        {
            //Arrange
            AreaCalculator calcTest     = new AreaCalculator();
            NewShape       newShapeTest = new NewShape();

            calcTest.AddShape(newShapeTest);

            //Act
            double[] testVar = { 1, 2 };

            // Assert
            Assert.IsTrue(calcTest.Calculate("test", testVar) == 999);
        }