示例#1
0
        public void GivenHalfSizeCalzone_WhenAskingForPrice_ThenItShouldReturnCorrectValue()
        {
            // arrange
            IProduct calzone = new Calzone(new HalfCalzoneSize());

            // act
            decimal actual = calzone.Price();

            // assert
            actual.Should().Be(8.0m);
        }
示例#2
0
        public void GivenDefaultCalzone_WhenAskingForPrice_ThenItShouldReturnCorrectValue()
        {
            // arrange
            IProduct calzone = new Calzone();

            // act
            decimal actual = calzone.Price();

            // assert
            actual.Should().Be(14.0m);
        }
示例#3
0
        public void GivenFullSizeCalzoneWithOneMeatIngredient_WhenAskingForPrice_ThenItShouldReturnCorrectValue()
        {
            // arrange
            IProduct calzone = new Calzone(new FullCalzoneSize(), new IIngredient[]
            {
                new Pepperoni(new Calzone(new FullCalzoneSize())),
            });

            // act
            decimal actual = calzone.Price();

            // assert
            actual.Should().Be(16.1m);
        }
示例#4
0
        public void GivenFullSizeCalzoneWithOneStandardIngredient_WhenAskingForPrice_ThenItShouldReturnCorrectValue()
        {
            // arrange
            IProduct calzone = new Calzone(new FullCalzoneSize(), new IIngredient[]
            {
                new Mushrooms(new Calzone(new FullCalzoneSize()))
            });

            // act
            decimal actual = calzone.Price();

            // assert
            actual.Should().Be(15.4m);
        }
示例#5
0
        public void GivenHalfSizeCalzoneWithTwoStandardIngredients_WhenAskingForPrice_ThenItShouldReturnCorrectValue()
        {
            // arrange
            IProduct calzone = new Calzone(new HalfCalzoneSize(), new IIngredient[]
            {
                new Mushrooms(new Calzone(new HalfCalzoneSize())),
                new Olives(new Calzone(new HalfCalzoneSize()))
            });

            // act
            decimal actual = calzone.Price();

            // assert
            actual.Should().Be(9.6m);
        }
示例#6
0
        public void GivenFullSizeCalzoneWithTwoStandardIngredientsTwoMeatIngredientsAndTwoPremiumIngredients_WhenAskingForPrice_ThenItShouldReturnCorrectValue()
        {
            // arrange
            IProduct calzone = new Calzone(new FullCalzoneSize(), new IIngredient[]
            {
                new Mushrooms(new Calzone(new FullCalzoneSize())),
                new Olives(new Calzone(new FullCalzoneSize())),
                new Bacon(new Calzone(new FullCalzoneSize())),
                new Ham(new Calzone(new FullCalzoneSize())),
                new RoastedGarlic(new Calzone(new FullCalzoneSize())),
                new FetaCheese(new Calzone(new FullCalzoneSize())),
            });

            // act
            decimal actual = calzone.Price();

            // assert
            actual.Should().Be(26.6m);
        }