Пример #1
0
        static void Main(string[] args)
        {
            var coffee = Breakfast.PourCoffee();

            while (!coffee.Temperature.Equals("Cold"))
            {
                Console.WriteLine("Coffee temperature: " + coffee.Temperature);
            }
            Console.WriteLine("Coffee temperature: " + coffee.Temperature);

            var bacon = Breakfast.FryBacon(5);

            Breakfast.EatBacon(ref bacon, 2);

            var eggs = Breakfast.FryEggs(4);

            eggs.Print();

            var toasts = Breakfast.ToastBread(6);

            Breakfast.ApplyButter(toasts[1]);
            Breakfast.ApplyButter(toasts[4]);

            for (int i = 0; i < toasts.Length; i++)
            {
                var buttered = toasts[i].ButterApplied;
                var jamed    = toasts[i].JamApplied;

                Console.WriteLine("Butter on Toast #" + i + ": " + buttered);
                Console.WriteLine("Jam on Toast #" + i + ": " + jamed);
            }
        }
Пример #2
0
 public void TestFryingBaconLength()
 {
     var bacon = Breakfast.FryBacon(3);
     Assert.AreEqual(3, bacon.Length);
     Breakfast.EatBacon(ref bacon, 2);
     Assert.AreEqual(1, bacon.Length);
 }
        public void TestFryingBaconLength()
        {
            var bacon = Breakfast.FryBacon(3);

            Assert.Equal(3, bacon.Count);
            Breakfast.EatBacon(bacon, 2);
            Assert.Equal(1, bacon.Count);
        }