public void HoldingShouldNotifyOfSpecialAndIngredientsPropertyChanged() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Special", () => { vw.HoldDressing(); }); Assert.PropertyChanged(vw, "Ingredients", () => { vw.HoldDressing(); }); Assert.PropertyChanged(vw, "Special", () => { vw.HoldLettuce(); }); Assert.PropertyChanged(vw, "Ingredients", () => { vw.HoldLettuce(); }); Assert.PropertyChanged(vw, "Special", () => { vw.HoldCheese(); }); Assert.PropertyChanged(vw, "Ingredients", () => { vw.HoldCheese(); }); }
public void HoldLettuceShouldNotifyofSpecialPropertyChange() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.PropertyChanged(vw, "Special", () => { vw.HoldLettuce(); }); }
public void PropertyShouldChangeVelociWrap() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Ingredients", () => vw.HoldDressing()); Assert.PropertyChanged(vw, "Ingredients", () => vw.HoldLettuce()); Assert.PropertyChanged(vw, "Ingredients", () => vw.HoldCheese()); Assert.PropertyChanged(vw, "Special", () => vw.HoldDressing()); Assert.PropertyChanged(vw, "Special", () => vw.HoldLettuce()); Assert.PropertyChanged(vw, "Special", () => vw.HoldCheese()); }
public void HoldLettucehouldNotifySpecialAndIngredientsChange() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Special", () => { vw.HoldLettuce(); }); Assert.PropertyChanged(vw, "Ingredients", () => { vw.HoldLettuce(); }); }
private void OnHoldLettuce(object sender, RoutedEventArgs args) { if (vw != null) { vw.HoldLettuce(); } else if (combo != null) { if (combo.Entree is VelociWrap vw) { vw.HoldLettuce(); combo.Entree = vw; } } }
/// <summary> /// Holds lettuce when selected /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SelectHoldLettuce(object sender, RoutedEventArgs args) { if (isCombo) { if (Combo.Entree is VelociWrap vw) { vw.HoldLettuce(); Combo.NotifyOfPropertyChange("Special"); } } else { vw.HoldLettuce(); } }
public void SpecialShouldHoldAll() { VelociWrap pbj = new VelociWrap(); pbj.HoldCheese(); pbj.HoldDressing(); pbj.HoldLettuce(); Assert.Collection <string>(pbj.Special, item => { Assert.Equal("Hold Romaine Lettuce", item); }, item => { Assert.Equal("Hold Ceasar Dressing", item); }, item => { Assert.Equal("Hold Parmesan Cheese", item); } ); }
public void HoldingLettuceShouldAddToSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains("Hold Lettuce", vw.Special); }
public void VelociWrapNotifyPropertyChanged() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Price", () => { vw.Price = 10; }); Assert.PropertyChanged(vw, "Calories", () => { vw.Calories = 10; }); System.Action[] actions = { () => { vw.HoldLettuce(); }, () => { vw.HoldDressing(); }, () => { vw.HoldCheese(); } }; string[] properties = { "Special", "Ingredients" }; foreach (System.Action action in actions) { foreach (string property in properties) { Assert.PropertyChanged(vw, property, action); } } }
public void ShouldHaveCorrectSpecials() { VelociWrap v = new VelociWrap(); v.HoldCheese(); Assert.Collection(v.Special, item => { Assert.Equal("Hold Cheese", item); }); v.cheese = true; v.HoldDressing(); Assert.Collection(v.Special, item => { Assert.Equal("Hold Dressing", item); }); v.dressing = true; v.HoldLettuce(); Assert.Collection(v.Special, item => { Assert.Equal("Hold Lettuce", item); }); v.HoldCheese(); v.HoldDressing(); string[] specials = new string[] { "Hold Dressing", "Hold Lettuce", "Hold Cheese" }; Assert.Equal(v.Special, specials); }
public void holdLettuceNotifies() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Special", () => { vw.HoldLettuce(); } ); Assert.PropertyChanged(vw, "Ingredients", () => { vw.HoldLettuce(); } ); }
public void SpecialShouldHoldLettuce() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Collection <string>(vw.Special, item => { Assert.Equal("Hold Lettuce", item); }); }
public void HoldLettuceShouldProvideCorrectSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains("Hold Lettuce", vw.Special); }
public void HoldLettuceShouldChangeSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains <string>("Hold Romaine Lettuce", vw.Special); }
public void SpecialShouldHoldLettuce() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains("Hold Lettuce", vw.Special); }
public void HoldLettuceAddsHoldLettuceToSpecial() { VelociWrap entree = new VelociWrap(); entree.HoldLettuce(); Assert.Equal("Hold Lettuce", entree.Special[0]); }
public void VelociwrapShouldHaveCorrectSpecialHoldLettuce() { VelociWrap pb = new VelociWrap(); pb.HoldLettuce(); Assert.Contains <string>("Hold Lettuce", pb.Special); }
public void HoldAllSouldAddToSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); vw.HoldLettuce(); vw.HoldDressing(); Assert.Collection <string>(vw.Special, item => { Assert.Equal("Hold Romaine Lettuce", item); }, item => { Assert.Equal("Hold Ceasar Dressing", item); }, item => { Assert.Equal("Hold Parmesan Cheese", item); }); }
public void HoldLettuceShouldRemoveLettuce() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.DoesNotContain <string>("Lettuce", vw.Ingredients); }
public void SpecialShouldBeCorrectAfterHoldingManyThings() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); vw.HoldDressing(); vw.HoldTortilla(); vw.HoldCheese(); Assert.Collection <string>(vw.Special, item => { Assert.Equal("Hold Caesar Dressing", item); }, item => { Assert.Equal("Hold Romaine Lettuce", item); }, item => { Assert.Equal("Hold Parmesan Cheese", item); }, item => { Assert.Equal("Hold Flour Tortilla", item); }); }
public void ShouldHaveCorrectSpecialAfterHoldingLettuce() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains <string>("Hold Lettuce", vw.Special); }
public void VelociWrapSpecialPropertiesShouldWorkProperly() { VelociWrap vw = new VelociWrap(); Assert.Empty(vw.Special); vw.HoldDressing(); Assert.Contains <string>("Hold Dressing", vw.Special); vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains <string>("Hold Lettuce", vw.Special); vw = new VelociWrap(); vw.HoldCheese(); Assert.Contains <string>("Hold Cheese", vw.Special); vw = new VelociWrap(); vw.HoldDressing(); vw.HoldLettuce(); vw.HoldCheese(); Assert.Contains <string>("Hold Dressing", vw.Special); Assert.Contains <string>("Hold Lettuce", vw.Special); Assert.Contains <string>("Hold Cheese", vw.Special); }
public void ShouldHaveHoldLettuceSpecial() { VelociWrap wrap = new VelociWrap(); wrap.HoldLettuce(); string[] special = { "Hold Lettuce" }; Assert.Equal(wrap.Special, special); }
public void HoldingItemsShouldNotifyOfPropertyChange(string s) { VelociWrap dn = new VelociWrap(); Assert.PropertyChanged(dn, s, () => { dn.HoldCheese(); }); Assert.PropertyChanged(dn, s, () => { dn.HoldDressing(); }); Assert.PropertyChanged(dn, s, () => { dn.HoldLettuce(); }); }
public void HoldingShouldNotifySpecialChange() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Special", () => vw.HoldLettuce()); Assert.PropertyChanged(vw, "Special", () => vw.HoldDressing()); Assert.PropertyChanged(vw, "Special", () => vw.HoldCheese()); }
public void AddLettuceShouldAddLettuce() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); vw.AddLettuce(); Assert.Contains("Romaine Lettuce", vw.Ingredients); }
public void VelociWrapPropertyChanges() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Special", () => vw.HoldCheese()); Assert.PropertyChanged(vw, "Special", () => vw.HoldDressing()); Assert.PropertyChanged(vw, "Special", () => vw.HoldLettuce()); }
public void ShouldHaveCorrectSpecialHoldLettuce() { VelociWrap vw = new VelociWrap(); vw.HoldLettuce(); Assert.Contains("Hold Lettuce", vw.Special); Assert.Single(vw.Special); }
public void OnHoldLettuce(object sender, RoutedEventArgs args) { wrap.HoldLettuce(); if (combo != null) { combo.Entree = wrap; } }
public void CheckAllNotifyPropertyChanges(string propertyName) { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, propertyName, () => vw.HoldCheese()); Assert.PropertyChanged(vw, propertyName, () => vw.HoldLettuce()); Assert.PropertyChanged(vw, propertyName, () => vw.HoldDressing()); }