Exemplo n.º 1
0
        public void ShouldHaveCorrectCaloriesAfteterRemovingSweetnerForSmall()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            tea.RemoveSweetener();
            Assert.Equal <uint>(8, tea.Calories);
        }
Exemplo n.º 2
0
        public void ShouldHaveCorrectCaloriesAfteterRemovingSweetnerForLarge()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Large;
            tea.AddSweetener();
            tea.RemoveSweetener();
            Assert.Equal <uint>(32, tea.Calories);
        }
Exemplo n.º 3
0
        public void RemoveSweetenerShouldNotifyIngredientsChange()
        {
            Tyrannotea tea = new Tyrannotea();

            Assert.PropertyChanged(tea, "Ingredients", () =>
            {
                tea.RemoveSweetener();
            });
        }
Exemplo n.º 4
0
        public void RemoveSweetenerShouldNotifyDescriptionChange()
        {
            Tyrannotea tea = new Tyrannotea();

            Assert.PropertyChanged(tea, "Description", () =>
            {
                tea.RemoveSweetener();
            });
        }
Exemplo n.º 5
0
        public void RemoveSweetShouldResultInCorrectCaloriesForLarge()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Large;
            tt.AddSweetener();
            tt.RemoveSweetener();
            Assert.Equal <uint>(32, tt.Calories);
        }
Exemplo n.º 6
0
        public void RemoveSweetShouldResultInCorrectCaloriesForMedium()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Medium;
            tt.AddSweetener();
            tt.RemoveSweetener();
            Assert.Equal <uint>(16, tt.Calories);
        }
Exemplo n.º 7
0
        public void RemovingSweetShouldSetCaloriesToDefault()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            tea.RemoveSweetener();
            if (tea.Size == Size.Small)
            {
                Assert.Equal <uint>(8, tea.Calories);
            }
            else if (tea.Size == Size.Medium)
            {
                Assert.Equal <uint>(16, tea.Calories);
            }
            else if (tea.Size == Size.Large)
            {
                Assert.Equal <uint>(32, tea.Calories);
            }
        }