コード例 #1
0
        public void ReturnSmallPizzaWithStandardCrustCost_WhenGetCostIsCalled()
        {
            var expectedCost   = 5.0;
            var smallPizza     = new SmallPizza();
            var crustDecorator = new CrustDecorator(smallPizza, Crusts.Classic);

            var actualCost = crustDecorator.GetCost();

            actualCost.Should().Be(expectedCost);
        }
コード例 #2
0
        public void ReturnSmallPizzaWithSpecialCrustCost_WhenGetCostIsCalled()
        {
            var expectedCost   = 6.0;
            var smallPizza     = new SmallPizza();
            var crustDecorator = new CrustDecorator(smallPizza, Crusts.Stuffed);

            var actualCost = crustDecorator.GetCost();

            actualCost.Should().Be(expectedCost);
        }