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

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

            t.Size = Size.Medium;
            t.AddSugar();
            t.RemoveSugar();
            Assert.Equal <uint>(16, t.Calories);
        }
Пример #3
0
        public void RemoveSugarShouldNotifyOfSpecialPropertyChange()
        {
            Tyrannotea t = new Tyrannotea();

            Assert.PropertyChanged(t, "Special", () =>
            {
                t.AddSugar();
                t.RemoveSugar();
            });
        }
Пример #4
0
        public void ResettingSweetShouldGetProperIngredients()
        {
            Tyrannotea t = new Tyrannotea();

            t.AddSugar();
            t.RemoveSugar();
            Assert.Contains <string>("Water", t.Ingredients);
            Assert.Contains <string>("Tea", t.Ingredients);
            Assert.Equal <int>(2, t.Ingredients.Count);
        }