public void WhenICallCalculateArea_ThenItReturnsTheCorrectArea()
        {
            double h = 2.0, w = 4.0, l = 5.0;

            _squareRoom.Height = h;
            _squareRoom.Length = l;
            _squareRoom.Width  = w;

            var expectedArea =
                ((h * l) * 2) +
                ((h * w) * 2);

            var area = _squareRoom.CalculateArea();

            area.Should().Be(expectedArea);
        }
        public void WhenICallCalculateCoverage_ThenTinsRequiredIsCalculatedCorrectly()
        {
            _mockQueryHandler.Setup(x => x.Handle(It.IsAny <IPaintDetailsQuery>()))
            .Returns(_paints);

            double H = 1, W = 2, L = 3, coverage = 10.0;
            var    room = new SquareRoom()
            {
                Height = H, Width = W, Length = L
            };
            double expectedTinsRequired = room.CalculateArea() / coverage;

            var rslt = _paintService.CalculateCoverage(room, 1);

            rslt.TinsRequired.Should().Be(expectedTinsRequired);
        }
        public void WhenICallCalculateCoverageWithInvalidPaintId_ThenItThrowsArgumentException()
        {
            _mockQueryHandler.Setup(x => x.Handle(It.IsAny <IPaintDetailsQuery>()))
            .Returns(_emptyPaints);

            double H = 1, W = 2, L = 3, coverage = 10.0;
            int    paintId = 1;
            var    room    = new SquareRoom()
            {
                Height = H, Width = W, Length = L
            };
            double expectedTinsRequired = room.CalculateArea() / coverage;

            _paintService.Invoking(p => p.CalculateCoverage(room, paintId))
            .Should().Throw <ArgumentException>();
        }