public void ShouldUseCorrectCaloriesForMedium() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Medium; Assert.Equal <uint>(156, ss.Calories); }
public void ShouldUseCorrectPriceForLarge() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Large; Assert.Equal(2.5, ss.Price, 2); }
public void ShouldBeAbleToSetSizeToMedium() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Medium; Assert.Equal <Size>(Size.Medium, ss.Size); }
public void ShouldUseCorrectCaloriesForLarge() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Large; Assert.Equal <uint>(208, ss.Calories); }
public void ShouldBeAbleToHoldIce() { SodaSaurus ss = new SodaSaurus(); ss.HoldIce(); Assert.False(ss.Ice); }
public void ShouldBeAbleToSetSizeToLarge() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Large; Assert.Equal <Size>(Size.Large, ss.Size); }
public void ShouldUseCorrectPriceForMedium() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Medium; Assert.Equal(2.0, ss.Price, 2); }
public void SpecialShouldRemoveIce() { SodaSaurus ss = new SodaSaurus(); ss.HoldIce(); Assert.Collection <string>(ss.Special, item => { Assert.Equal("Hold Ice", item); }); }
public void SodaSaurusToStringShouldGiveNameForSizeAndFlavor(Size size, SodasaurusFlavor flavor) { SodaSaurus soda = new SodaSaurus(); soda.Size = size; soda.Flavor = flavor; Assert.Equal($"{size} {flavor} Sodasaurus", soda.ToString()); }
public DrinkSelection(SodaSaurus soda) { InitializeComponent(); DecafButton.IsEnabled = false; SweetButton.IsEnabled = false; LemonButton.IsEnabled = false; drink = soda; }
public void SodasaurusChangeSizeShouldNotifyProperty(Size size, string property) { SodaSaurus soda = new SodaSaurus(); Assert.PropertyChanged(soda, property, () => { soda.Size = size; }); }
public void SodasaurusChangeFlavorShouldNotifyPropertyDescription(SodasaurusFlavor flavor) { SodaSaurus soda = new SodaSaurus(); Assert.PropertyChanged(soda, "Description", () => { soda.Flavor = flavor; }); }
public void ChangingToLargeShouldNotifyOfPricePropertyChange() { SodaSaurus ss = new SodaSaurus(); Assert.PropertyChanged(ss, "Price", () => { ss.Size = Size.Large; }); }
public void ChangingToLargeShouldNotifyOfDescriptionPropertyChange() { SodaSaurus ss = new SodaSaurus(); Assert.PropertyChanged(ss, "Description", () => { ss.Size = Size.Large; }); }
public void ShouldHaveCorrectIngedients() { SodaSaurus ss = new SodaSaurus(); Assert.Contains <string>("Water", ss.Ingredients); Assert.Contains <string>("Natural Flavors", ss.Ingredients); Assert.Contains <string>("Cane Sugar", ss.Ingredients); Assert.Equal <int>(3, ss.Ingredients.Count); }
public void SodasaurusHoldIceShouldNotifyPropertySpecial() { SodaSaurus soda = new SodaSaurus(); Assert.PropertyChanged(soda, "Special", () => { soda.HoldIce(); }); }
public void SettingFlavorToLimeShouldNotifyOfDescriptionPropertyChange() { SodaSaurus ss = new SodaSaurus(); Assert.PropertyChanged(ss, "Description", () => { ss.Flavor = SodasaurusFlavor.Lime; }); }
public void ChangingToSmallShouldNotifyOfDescriptionPropertyChange() { SodaSaurus ss = new SodaSaurus(); ss.Size = Size.Medium; Assert.PropertyChanged(ss, "Description", () => { ss.Size = Size.Small; }); }
public void ShouldHaveCorrectDefaultPrice() { SodaSaurus ss = new SodaSaurus(); Assert.Equal(1.50, ss.Price, 2); }
public void ShouldHaveCorrectDefaultCalories() { SodaSaurus ss = new SodaSaurus(); Assert.Equal <uint>(112, ss.Calories); }
public void ShouldHaveCorrectDefaultSize() { SodaSaurus ss = new SodaSaurus(); Assert.Equal <Size>(Size.Small, ss.Size); }