Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 7
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");
        }