public void ShouldBeAbleToRemoveSugar() { Tyrannotea tea = new Tyrannotea(); tea.AddSugar(); Assert.True(tea.Sugar); Assert.Equal <uint>(16, tea.Calories); tea.AddSugar(); Assert.False(tea.Sugar); Assert.Equal <uint>(8, tea.Calories); }
public void AddSweetener() { Tyrannotea tea = new Tyrannotea(); tea.AddSugar(); Assert.True(tea.Calories == 16); tea.Size = Size.Medium; tea.AddSugar(); Assert.True(32 == tea.Calories); tea.Size = Size.Large; tea.AddSugar(); Assert.True(64 == tea.Calories); }
public void InvokingAddSugarAddsSugarToIngredients() { Tyrannotea tea = new Tyrannotea(); tea.AddSugar(); Assert.Contains <string>("Cane Sugar", tea.Ingredients); }
public void ShouldBeAbleToAddSugar() { Tyrannotea tea = new Tyrannotea(); tea.AddSugar(); Assert.Contains("Cane Sugar", tea.Ingredients); Assert.Equal <uint>(16, tea.Calories); }
public void ShouldHaveCorrectCaloriesForMediumWithSugar() { Tyrannotea tea = new Tyrannotea(); tea.Size = Size.Medium; tea.AddSugar(); Assert.Equal <uint>(32, tea.Calories); }
public void SettingSweetShouldGetProperCaloriesForLarge() { Tyrannotea t = new Tyrannotea(); t.Size = Size.Large; t.AddSugar(); Assert.Equal <uint>(64, t.Calories); }
public void ShouldHaveCorrectCaloriesForSmallWithSugar() { Tyrannotea tea = new Tyrannotea(); tea.Size = Size.Small; tea.AddSugar(); Assert.Equal <uint>(16, tea.Calories); }
public void SettingSweetShouldGetProperCaloriesForMedium() { Tyrannotea t = new Tyrannotea(); t.Size = Size.Medium; t.AddSugar(); Assert.Equal <uint>(32, t.Calories); }
public void SettingSweetShouldGetProperCaloriesForSmall() { Tyrannotea t = new Tyrannotea(); t.Size = Size.Small; t.AddSugar(); Assert.Equal <uint>(16, t.Calories); }
public void ShouldHaveCorrectCaloriesForLargeWithSugar() { Tyrannotea tea = new Tyrannotea(); tea.Size = Size.Large; tea.AddSugar(); Assert.Equal <uint>(64, tea.Calories); }
public void SweetPropertyToTrueResultsInRightCaloriesForLarge() { uint teaLargeExpectedCalories = 64; Tyrannotea teaLarge = new Tyrannotea(); teaLarge.AddSugar(); teaLarge.Size = Size.Large; Assert.Equal <uint>(teaLargeExpectedCalories, teaLarge.Calories); }
public void SweetPropertyToTrueResultsInRightCaloriesForMedium() { uint teaMediumExpectedCalories = 32; Tyrannotea teaMedium = new Tyrannotea(); teaMedium.AddSugar(); teaMedium.Size = Size.Medium; Assert.Equal <uint>(teaMediumExpectedCalories, teaMedium.Calories); }
public void SweetPropertyToTrueResultsInRightCaloriesForSmall() { uint teaSmallExpectedCalories = 16; Tyrannotea teaSmall = new Tyrannotea(); teaSmall.AddSugar(); teaSmall.Size = Size.Small; Assert.Equal <uint>(teaSmallExpectedCalories, teaSmall.Calories); }
public void AddSugarShouldNotifyOfSpecialPropertyChange() { Tyrannotea t = new Tyrannotea(); Assert.PropertyChanged(t, "Special", () => { t.AddSugar(); }); }
public void TyrannoteaSetSweetShouldNotifyPropertyDescription() { Tyrannotea tea = new Tyrannotea(); Assert.PropertyChanged(tea, "Description", () => { tea.AddSugar(); }); }
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); }
public void SpecialShouldMakeSweet() { Tyrannotea t = new Tyrannotea(); t.AddSugar(); Assert.Collection <string>(t.Special, item => { Assert.Equal("Sweet", item); }); }
public void ShouldHaveCorrectIngredientsWithSugar() { Tyrannotea tea = new Tyrannotea(); tea.AddSugar(); Assert.Contains <string>("Water", tea.Ingredients); Assert.Contains <string>("Tea", tea.Ingredients); Assert.Contains <string>("Cane Sugar", tea.Ingredients); Assert.Equal <int>(3, tea.Ingredients.Count); }