示例#1
0
        public void Test_PizzaCrust()
        {
            // arrange
            var sut = new VeganPizza();

            // act
            var actual = sut.Crust;

            // assert
            Assert.Equal("Cauliflower", actual.Name);
        }
示例#2
0
        public void Test_PizzaCrust()
        {
            // arrange
            var sut = new VeganPizza(new SmallSize());

            // act
            var actual = sut.Crust.Name;

            // assert
            Assert.Equal("Thin Crust", actual);
        }
        public void Test_VeganPizzaToppings()
        {
            // arrange
            var sut = new VeganPizza();

            // act
            var actual = sut.Toppings;

            // assert
            Assert.NotNull(actual);
        }
        public void Test_VeganPizzaSize()
        {
            // arrange
            var sut = new VeganPizza();

            // act
            var actual = sut.Size;

            // assert
            Assert.NotNull(actual);
        }
        public void Test_VeganPizzaCrust()
        {
            // arrange
            var sut = new VeganPizza();

            // act
            var actual = sut.Crust;

            // assert
            Assert.NotNull(sut.Crust);
        }
示例#6
0
        public void Test_PizzaCrust()
        {
            // arrange
            var sut = new VeganPizza();

            // act
            var actual = sut.Crust.Name;

            // assert
            Assert.Equal(actual, "Thin Crust");
        }
        public void Test_VeganPizzaPrice()
        {
            // arrange
            var sut = new VeganPizza();

            // act
            var actual = sut.Price;

            var total = sut.Crust.Price + sut.Size.Price;

            sut.Toppings.ForEach(topping => total += topping.Price);

            // assert
            Assert.Equal(actual, total);
        }