Пример #1
0
        public void ShouldHaveCorrectCaloriesAfterSettingLargeAndSweetToUnsweet()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Large;
            tea.AddSweetener();
            tea.AddSweetener();
            Assert.Equal <uint>(32, tea.Calories);
        }
Пример #2
0
        public void ShouldBeAbleToAddSweetener()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            Assert.True(tea.Sweet);
        }
Пример #3
0
        public void ShouldHaveCorrectSweetTeaCaloriesForSmall()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            Assert.Equal <uint>(16, tea.Calories);
        }
Пример #4
0
        public void ShouldHaveCorrectDescriptionMethodIncludingSweetener()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            Assert.Equal($"{tea.Size} Sweet Tyrannotea", tea.Description);
        }
Пример #5
0
        public void AddSweetenerShouldMakeSweet()
        {
            Tyrannotea t = new Tyrannotea();

            t.AddSweetener();
            Assert.True(t.Sweet);
            Assert.Contains("Cane Sugar", t.Ingredients);
        }
Пример #6
0
        public void SweetShouldDoubleCaloriesForLarge()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Large;
            tt.AddSweetener();
            Assert.Equal <uint>(64, tt.Calories);
        }
Пример #7
0
        public void SweetShouldDoubleCaloriesForMediumm()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Medium;
            tt.AddSweetener();
            Assert.Equal <uint>(32, tt.Calories);
        }
Пример #8
0
        public void SweetShouldDoubleCaloriesForSmall()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Small;
            tt.AddSweetener();
            Assert.Equal <uint>(16, tt.Calories);
        }
Пример #9
0
        public void ShouldHaveCorrectCaloriesAfterSettingSmallAndSweet()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Small;
            tea.AddSweetener();
            Assert.Equal <uint>(16, tea.Calories);
        }
Пример #10
0
        public void ShouldHaveCorrectCaloriesForSmallWithSweetener()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            tea.Size = Size.Small;
            Assert.Equal <uint>(16, tea.Calories);
        }
Пример #11
0
        public void ShouldHaveCorrectCaloriesWhenMediumAndSweet()
        {
            Tyrannotea t = new Tyrannotea();

            t.AddSweetener();
            t.Size = Size.Medium;
            Assert.Equal <uint>(32, t.Calories);
        }
Пример #12
0
        public void ShouldHaveCorrectCaloriesWhenLargeAndSweet()
        {
            Tyrannotea t = new Tyrannotea();

            t.AddSweetener();
            t.Size = Size.Large;
            Assert.Equal <uint>(64, t.Calories);
        }
Пример #13
0
        public void ShouldHaveCorrectSweetTeaCaloriesForLarge()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Large;
            tea.AddSweetener();
            Assert.Equal <uint>(64, tea.Calories);
        }
Пример #14
0
        public void ShouldHaveCorrectCaloriesWhenSmallAndSweet()
        {
            Tyrannotea t = new Tyrannotea();

            t.AddSweetener();
            t.Size = Size.Small;
            Assert.Equal <uint>(16, t.Calories);
        }
Пример #15
0
        public void SweetPropertyResultsInCorrectCaloriesForSmall()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Small;
            tea.AddSweetener();
            Assert.Equal <uint>(16, tea.Calories);
        }
Пример #16
0
        public void AddSweetenerShouldAddSugar()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            Assert.True(tea.Sweet);
            Assert.Contains <string>("Cane Sugar", tea.Ingredients);
        }
Пример #17
0
        public void ShouldHaveCorrectSweetTeaCaloriesForMedium()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Medium;
            tea.AddSweetener();
            Assert.Equal <uint>(32, tea.Calories);
        }
Пример #18
0
        public void SweetPropertyResultsInCorrectCaloriesForLarge()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Large;
            tea.AddSweetener();
            Assert.Equal <uint>(64, tea.Calories);
        }
Пример #19
0
        public void SweetPropertyResultsInCorrectCaloriesForMedium()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Medium;
            tea.AddSweetener();
            Assert.Equal <uint>(32, tea.Calories);
        }
Пример #20
0
        public void SpecialShouldAddSweetner()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            Assert.Collection <string>(tea.Special,
                                       item => { Assert.Equal("Add Sweetener", item); });
        }
Пример #21
0
        public void ShouldHaveCorrectCaloriesAfteterRemovingSweetnerForSmall()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweetener();
            tea.RemoveSweetener();
            Assert.Equal <uint>(8, tea.Calories);
        }
Пример #22
0
        public void ShouldHaveCorrectCaloriesAfteterRemovingSweetnerForLarge()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Large;
            tea.AddSweetener();
            tea.RemoveSweetener();
            Assert.Equal <uint>(32, tea.Calories);
        }
Пример #23
0
        public void RemoveSweetShouldResultInCorrectCaloriesForLarge()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Large;
            tt.AddSweetener();
            tt.RemoveSweetener();
            Assert.Equal <uint>(32, tt.Calories);
        }
Пример #24
0
        public void AddSweetenerShouldNotifyIngredientsChange()
        {
            Tyrannotea tea = new Tyrannotea();

            Assert.PropertyChanged(tea, "Ingredients", () =>
            {
                tea.AddSweetener();
            });
        }
Пример #25
0
        public void AddSweetenerShouldSpecialChange()
        {
            Tyrannotea tea = new Tyrannotea();

            Assert.PropertyChanged(tea, "Special", () =>
            {
                tea.AddSweetener();
            });
        }
        public void TyrannoteaAddSweetenerShouldNotifyPropertyDescription()
        {
            Tyrannotea tea = new Tyrannotea();

            Assert.PropertyChanged(tea, "Description", () =>
            {
                tea.AddSweetener();
            });
        }
Пример #27
0
        public void AddSweetenerShouldNotifyPropertyChange(string propertyName)
        {
            Tyrannotea t = new Tyrannotea();

            Assert.PropertyChanged(t, propertyName, () =>
            {
                t.AddSweetener();
            });
        }
Пример #28
0
        public void RemoveSweetShouldResultInCorrectCaloriesForMedium()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Medium;
            tt.AddSweetener();
            tt.RemoveSweetener();
            Assert.Equal <uint>(16, tt.Calories);
        }
Пример #29
0
        public void ShouldHaveCorrectIngredientsAfterAddingSweetener()
        {
            Tyrannotea t = new Tyrannotea();

            t.AddSweetener();
            Assert.Contains <string>("Water", t.Ingredients);
            Assert.Contains <string>("Tea", t.Ingredients);
            Assert.Contains <string>("Cane Sugar", t.Ingredients);
            Assert.Equal <int>(3, t.Ingredients.Count);
        }
Пример #30
0
        public void ShouldHaveCorrectCaloriesForSmall()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.Size = Size.Medium;
            tea.Size = Size.Small;
            Assert.Equal <double>(8, tea.Calories);
            tea.AddSweetener();
            Assert.Equal <double>(16, tea.Calories);
        }