コード例 #1
0
        public void ReturnSmallPizzaWithStandardSauceCost_WhenGetCostIsCalled()
        {
            var expectedCost   = 5.25;
            var smallPizza     = new SmallPizza();
            var crustDecorator = new SauceDecorator(smallPizza, Sauces.Tomato);

            var actualCost = crustDecorator.GetCost();

            actualCost.Should().Be(expectedCost);
        }
コード例 #2
0
        public void ReturnSmallPizzaWithSpecialSauceCost_WhenGetCostIsCalled()
        {
            var expectedCost   = 5.5;
            var smallPizza     = new SmallPizza();
            var crustDecorator = new SauceDecorator(smallPizza, Sauces.Barbecue);

            var actualCost = crustDecorator.GetCost();

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