public void DescriptionShouldBeCorrect() { var ntsh = new NothingToSeeHere(); string description = "The breakfast classic of bacon, eggs, and Texas toast."; Assert.Equal(description, ntsh.Description); }
public void ShouldHaveCorrectCalories(bool substituteSausage, uint expectedCalories) { var ntsh = new NothingToSeeHere() { SubstituteSausage = substituteSausage }; Assert.Equal(expectedCalories, ntsh.Calories); }
/// <summary> /// Handler for event of Nothing To See Here Button /// Creates new instance of customization window /// Passes updated item object back on window close /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void NothingToSeeHere_Click(object sender, EventArgs e) { NothingToSeeHereCustom ntshcWindow = new NothingToSeeHereCustom(); NothingToSeeHere ntsh = new NothingToSeeHere(); ntshcWindow.ShowDialog(); ntsh = ntshcWindow.ntsh; OrderList.Add(ntsh); }
public void ShouldProvideCurrentSpecialInstructions(bool substituteSausage, EggStyle eggStyle, string[] instructions) { var ntsh = new NothingToSeeHere() { SubstituteSausage = substituteSausage, EggStyle = eggStyle }; foreach (string expected in instructions) { Assert.Contains(expected, ntsh.SpecialInstructions); } Assert.Equal(instructions.Length, ntsh.SpecialInstructions.Count); }
public void ShouldChangeProperty() { var ntsh = new NothingToSeeHere(); ntsh.EggStyle = EggStyle.HardBoiled; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.HardBoiled); ntsh.EggStyle = EggStyle.OverEasy; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.OverEasy); ntsh.EggStyle = EggStyle.OverMedium; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.OverMedium); ntsh.EggStyle = EggStyle.OverWell; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.OverWell); ntsh.EggStyle = EggStyle.Poached; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.Poached); ntsh.EggStyle = EggStyle.Scrambled; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.Scrambled); ntsh.EggStyle = EggStyle.SunnySideUp; Assert.PropertyChanged(ntsh, "EggStyle", () => ntsh.EggStyle = EggStyle.SunnySideUp); ntsh.SubstituteSausage = true; Assert.PropertyChanged(ntsh, "SubstituteSausage", () => ntsh.SubstituteSausage = true); }
public NothingToSeeHereCustom() { ntsh = new NothingToSeeHere(); InitializeComponent(); }
public void ShouldHaveCorrectPrice() { var ntsh = new NothingToSeeHere(); Assert.Equal(3.50m, ntsh.Price); }
public void NameShouldBeCorrect() { var ntsh = new NothingToSeeHere(); Assert.Equal("Nothing to See Here", ntsh.Name); }