Ejemplo n.º 1
0
        public void DescriptionShouldBeCorrect()
        {
            var    ntsh        = new NothingToSeeHere();
            string description = "The breakfast classic of bacon, eggs, and Texas toast.";

            Assert.Equal(description, ntsh.Description);
        }
Ejemplo n.º 2
0
        public void ShouldHaveCorrectCalories(bool substituteSausage, uint expectedCalories)
        {
            var ntsh = new NothingToSeeHere()
            {
                SubstituteSausage = substituteSausage
            };

            Assert.Equal(expectedCalories, ntsh.Calories);
        }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public NothingToSeeHereCustom()
 {
     ntsh = new NothingToSeeHere();
     InitializeComponent();
 }
Ejemplo n.º 7
0
        public void ShouldHaveCorrectPrice()
        {
            var ntsh = new NothingToSeeHere();

            Assert.Equal(3.50m, ntsh.Price);
        }
Ejemplo n.º 8
0
        public void NameShouldBeCorrect()
        {
            var ntsh = new NothingToSeeHere();

            Assert.Equal("Nothing to See Here", ntsh.Name);
        }