Пример #1
0
        public void ShouldDisplayFullCalzoneDescriptionWithNoToppings()
        {
            //Arrange
            ICalzone        pizza           = CalzoneType.FullCalzone.Create();
            IDescription    subject         = pizza.Description();
            TestWriteString testWriteString = new TestWriteString();

            //Act
            subject.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Full calzone");
        }
Пример #2
0
        public void ShouldDisplayMediumDescriptionWithNoToppings()
        {
            //Arrange
            IPizza          pizza           = PizzaType.Medium.Create();
            IDescription    subject         = pizza.Description();
            TestWriteString testWriteString = new TestWriteString();

            //Act
            subject.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Medium pizza");
        }
Пример #3
0
        public void ShouldDisplayDescriptionWithNoToppings()
        {
            //Arrange
            IPizza          pizza           = PizzaType.Personal.Create();
            IDescription    actual          = pizza.Description();
            TestWriteString testWriteString = new TestWriteString();

            //Act
            actual.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Personal pizza");
        }
Пример #4
0
        public void ShouldMaintainToppingsAfterResizeFromHalfToFull()
        {
            //Arrange
            ICalzone        initial         = CalzoneType.HalfCalzone.Create().AddTopping(Topping.Mushroom);
            ICalzone        subject         = initial.As(CalzoneType.FullCalzone);
            TestWriteString testWriteString = new TestWriteString();
            IDescription    actual          = subject.Description();

            //Act
            actual.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Full calzone with Mushroom");
        }
Пример #5
0
        public void ShouldMaintainToppingsAfterResizeFromPersonalToMedium()
        {
            //Arrange
            IPizza          initial         = PizzaType.Personal.Create().AddTopping(Topping.Mushroom);
            IPizza          subject         = initial.As(PizzaType.Medium);
            TestWriteString testWriteString = new TestWriteString();
            IDescription    actual          = subject.Description();

            //Act
            actual.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Medium pizza with Mushroom");
        }
Пример #6
0
        public void ShouldDisplayDescriptionWithTopping()
        {
            //Arrange
            IPizza          initial         = PizzaType.Personal.Create();
            IPizza          pizza           = initial.AddTopping(Topping.Mozzarella);
            IDescription    actual          = pizza.Description();
            TestWriteString testWriteString = new TestWriteString();

            //Act
            actual.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Personal pizza with Mozzarella");
        }
Пример #7
0
        public void ShouldBeFetaCheese()
        {
            //Arrange
            IPizza subject = PizzaType.Medium.Create().AddTopping(Topping.FetaCheese);

            //Act
            IDescription    actual = subject.Description();
            TestWriteString intoer = new TestWriteString();

            actual.Into(intoer);

            //Assert
            intoer.AssertValueIs("Medium pizza with Feta Cheese");
        }
Пример #8
0
        public void ShouldProvideDescriptionWithThreeToppings()
        {
            //Arrange
            IPizza initial = PizzaType.Personal.Create();
            IPizza pizza   = initial
                             .AddTopping(Topping.Mushroom)
                             .AddTopping(Topping.Olive)
                             .AddTopping(Topping.Mozzarella);
            IDescription    actual          = pizza.Description();
            TestWriteString testWriteString = new TestWriteString();

            //Act
            actual.Into(testWriteString);

            //Assert
            testWriteString.AssertValueIs("Personal pizza with Mushroom, Olive and Mozzarella");
        }