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 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 HoldCheeseShouldNotifyofSpecialPropertyChange() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); Assert.PropertyChanged(vw, "Special", () => { vw.HoldCheese(); }); }
public void SpecialShouldHoldCheese() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); Assert.Contains("Hold Cheese", vw.Special); }
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 HoldingCheeseShouldAddToSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); Assert.Contains("Hold Cheese", 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 SpecialShouldHoldCheese() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); Assert.Collection <string>(vw.Special, item => { Assert.Equal("Hold Cheese", item); }); }
public void holdCheeseNotifies() { VelociWrap vw = new VelociWrap(); Assert.PropertyChanged(vw, "Special", () => { vw.HoldCheese(); } ); Assert.PropertyChanged(vw, "Ingredients", () => { vw.HoldCheese(); } ); }
public void HoldCheeseShouldProvideCorrectSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); Assert.Contains("Hold Cheese", vw.Special); }
public void HoldCheeseShouldChangeSpecial() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); Assert.Contains <string>("Hold Parmesan Cheese", vw.Special); }
public void VelociwrapShouldHaveCorrectSpecialHoldCheese() { VelociWrap pb = new VelociWrap(); pb.HoldCheese(); Assert.Contains <string>("Hold Cheese", pb.Special); }
public void AddCheeseShouldAddCheese() { VelociWrap vw = new VelociWrap(); vw.HoldCheese(); vw.AddCheese(); Assert.Contains("Parmesan Cheese", vw.Ingredients); }
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 ShouldHaveHoldCheeseSpecial() { VelociWrap wrap = new VelociWrap(); wrap.HoldCheese(); string[] special = { "Hold Cheese" }; Assert.Equal(wrap.Special, special); }