Beispiel #1
0
        public void ShouldCalculateCorectAreaFor(double lenght, double width, double expectedArea)
        {
            var shape = new NewAndSmartRectangle(lenght, width);

            var actualArea = ShapeAreaManager.CalculateArea(shape);

            Assert.AreEqual(expectedArea, actualArea);
        }
Beispiel #2
0
        public void ShouldHaveInvalidPostconditionsFor(double lenght, double width)
        {
            Assert.Throws <InvalidOperationException>(() =>
            {
                var shape = new NewAndSmartRectangle(lenght, width);

                ShapeAreaManager.CalculateArea(shape);
            });
        }