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

            tea.RemoveSweet();
            Assert.False(tea.Sweet);
            Assert.Equal <double>(8, tea.Calories);
        }
Пример #2
0
        public void FalseSweetPropertyToRightCaloriesForSizeLarge()
        {
            Tyrannotea tea = new Tyrannotea();

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

            tea.AddSweet();
            tea.RemoveSweet();
            tea.Size = Size.Medium;
            Assert.Equal <uint>(16, tea.Calories);
        }
Пример #4
0
        public void SweetToUnsweetShouldHaveCorrectCaloriesForLarge()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Large;
            tt.AddSweet();
            tt.RemoveSweet();
            Assert.Equal <uint>(32, tt.Calories);
        }
Пример #5
0
        public void SweetToUnsweetShouldHaveCorrectCaloriesForMedium()
        {
            Tyrannotea tt = new Tyrannotea();

            tt.Size = Size.Medium;
            tt.AddSweet();
            tt.RemoveSweet();
            Assert.Equal <uint>(16, tt.Calories);
        }
Пример #6
0
        public void RemoveSweetShouldNotifyOfPropertyChanged(string propertyName)
        {
            Tyrannotea tea = new Tyrannotea();

            Assert.PropertyChanged(tea, propertyName, () =>
            {
                tea.RemoveSweet();
            });
        }
Пример #7
0
        public void RemoveSweetShouldNotifyDescriptionChange()
        {
            Tyrannotea tt = new Tyrannotea();

            Assert.PropertyChanged(tt, "Description",
                                   () =>
            {
                tt.RemoveSweet();
            });
        }
Пример #8
0
        public void RemovingSweetPropertyShouldDecreaseCalories()
        {
            Tyrannotea tea = new Tyrannotea();

            tea.AddSweet();
            tea.RemoveSweet();
            Assert.Equal <uint>(8, tea.Calories);
            tea.Size = Size.Medium;
            Assert.Equal <uint>(16, tea.Calories);
            tea.Size = Size.Large;
            Assert.Equal <uint>(32, tea.Calories);
        }