public void CorrectSpecialHoldJelly() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.Contains("Hold Jelly", pbj.Special); }
public void HoldingItemsShouldNotifyOfPropertyChange(string s) { PrehistoricPBJ dn = new PrehistoricPBJ(); Assert.PropertyChanged(dn, s, () => { dn.HoldJelly(); }); Assert.PropertyChanged(dn, s, () => { dn.HoldPeanutButter(); }); }
public void holdJellyNotifies() { PrehistoricPBJ pbj = new PrehistoricPBJ(); Assert.PropertyChanged(pbj, "Special", () => { pbj.HoldJelly(); } ); Assert.PropertyChanged(pbj, "Ingredients", () => { pbj.HoldJelly(); } ); }
public void PrehistoricPBJNotifyPropertyChanged() { PrehistoricPBJ pbj = new PrehistoricPBJ(); Assert.PropertyChanged(pbj, "Price", () => { pbj.Price = 10; }); Assert.PropertyChanged(pbj, "Calories", () => { pbj.Calories = 10; }); System.Action[] actions = { () => { pbj.HoldPeanutButter(); }, () => { pbj.HoldJelly(); }, }; string[] properties = { "Special", "Ingredients" }; foreach (System.Action action in actions) { foreach (string property in properties) { Assert.PropertyChanged(pbj, property, action); } } }
public void HoldJellyShouldRemoveJelly() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.DoesNotContain <string>("Jelly", pbj.Ingredients); }
public void PrehistoricPBJShouldNotify() { PrehistoricPBJ p = new PrehistoricPBJ(); Assert.PropertyChanged(p, "Special", () => p.HoldJelly()); Assert.PropertyChanged(p, "Special", () => p.HoldPeanutButter()); }
public void ShouldHaveCorrectSpecialHoldJelly() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.Contains("Hold Jelly", pbj.Special); Assert.Single(pbj.Special); }
public void HoldJellyShouldNotifyOfSpecialChanged() { PrehistoricPBJ pbj = new PrehistoricPBJ(); Assert.PropertyChanged(pbj, "Special", () => { pbj.HoldJelly(); }); }
public void ShouldHaveHoldJellySpecial() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); string[] special = { "Hold Jelly" }; Assert.Equal(pbj.Special, special); }
private void OnHoldJelly(object sender, RoutedEventArgs args) { pbj.HoldJelly(); if (combo != null) { combo.Entree = pbj; } }
public void SpecialShouldHoldJellyAndPeanutButter() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); pbj.HoldPeanutButter(); Assert.Collection <string>(pbj.Special, item => { Assert.Equal("Hold Peanut Butter", item); }, item => { Assert.Equal("Hold Jelly", item); }); }
public void AddJellyShouldAddJelly() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); pbj.AddJelly(); Assert.Contains("Jelly", pbj.Ingredients); }
public void HoldingJellyShouldNotifyIngredientChange() { PrehistoricPBJ pbj = new PrehistoricPBJ(); Assert.PropertyChanged(pbj, "Ingredients", () => { pbj.HoldJelly(); }); }
public void ShouldHaveAllSpecials() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldPeanutButter(); pbj.HoldJelly(); string[] special = { "Hold Peanut Butter", "Hold Jelly" }; Assert.Equal(pbj.Special, special); }
public void AddAllSpecialsToSpecial() { PrehistoricPBJ entree = new PrehistoricPBJ(); entree.HoldPeanutButter(); entree.HoldJelly(); Assert.Equal("Hold Peanut Butter", entree.Special[0]); Assert.Equal("Hold Jelly", entree.Special[1]); }
public void ShouldHaveCorrectSpecialAfterHoldingPeanutButterAndHoldingJelly() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldPeanutButter(); pbj.HoldJelly(); Assert.Contains <string>("Hold Peanut Butter", pbj.Special); Assert.Contains <string>("Hold Jelly", pbj.Special); }
public void PBnJAllHolds() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.Contains("Hold Jelly", pbj.Special); pbj.HoldPeanutButter(); Assert.Contains("Hold Peanut Butter", pbj.Special); }
public void HoldingJellyShouldNotifySpecialChange() { PrehistoricPBJ p = new PrehistoricPBJ(); Assert.PropertyChanged(p, "Special", () => { p.HoldJelly(); }); }
public void PrehistoricPBJShouldHaveCorrectSpecialForHoldAll() { PrehistoricPBJ pb = new PrehistoricPBJ(); pb.HoldJelly(); pb.HoldPeanutButter(); Assert.Contains <string>("Hold Jelly", pb.Special); Assert.Contains <string>("Hold Peanut Butter", pb.Special); }
public void HoldJellyrShouldAddToSpecial() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.Contains("Hold Jelly", pbj.Special); Assert.Single(pbj.Special); }
public void HoldPeanutButterAndJellyProvidesCorrectSpecial() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldPeanutButter(); pbj.HoldJelly(); Assert.Contains("Hold Peanut Butter", pbj.Special); Assert.Contains("Hold Jelly", pbj.Special); }
public void HoldJellyPeanutButterShouldChangeSpecial() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); pbj.HoldPeanutButter(); Assert.Contains <string>("Hold Jelly", pbj.Special); Assert.Contains <string>("Hold Peanut Butter", pbj.Special); }
public void AddingNuggetsShouldNotifyOfPropertyChange(string propertyName) { PrehistoricPBJ pbj = new PrehistoricPBJ(); Assert.PropertyChanged(pbj, propertyName, () => { pbj.HoldJelly(); }); }
public void ShouldHaveAllSpecial() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldPeanutButter(); pbj.HoldJelly(); Assert.Contains("Hold Peanut Butter", pbj.Special); Assert.Contains("Hold Jelly", pbj.Special); }
public void BothPrehistoricPBJSpecialShouldChange() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); pbj.HoldPeanutButter(); Assert.Contains("Hold Peanut Butter", pbj.Special); Assert.Contains("Hold Jelly", pbj.Special); }
public void HoldJellyShouldAddToSpecial() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.Collection <string>(pbj.Special, item => { Assert.Equal("Hold Jelly", item); }); }
public void ShouldHaveCorrectSpecialForHoldJelly() { PrehistoricPBJ pbj = new PrehistoricPBJ(); pbj.HoldJelly(); Assert.Collection <string>(pbj.Special, item => { Assert.Equal("Hold Jelly", item); }); }
public void NotifyOfPropertyChanged() { PrehistoricPBJ p = new PrehistoricPBJ(); Assert.PropertyChanged(p, "Special", () => { p.HoldJelly(); p.HoldPeanutButter(); }); }
public void ShouldHaveCorrectSpecials() { PrehistoricPBJ p = new PrehistoricPBJ(); p.HoldJelly(); Assert.Collection(p.Special, item => { Assert.Equal("Hold Jelly", item); }); p.jelly = true; p.HoldPeanutButter(); Assert.Collection(p.Special, item => { Assert.Equal("Hold Peanut Butter", item); }); p.HoldJelly(); string[] specials = new string[] { "Hold Peanut Butter", "Hold Jelly" }; Assert.Equal(p.Special, specials); }
public void PrehistoricPBJSpecialsTest() { PrehistoricPBJ pbj = new PrehistoricPBJ(); Assert.Empty(pbj.Special); pbj.HoldPeanutButter(); Assert.Contains("Hold Peanut Butter", pbj.Special); pbj.HoldJelly(); Assert.Contains("Hold Jelly", pbj.Special); }