예제 #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);
        }