Esempio n. 1
0
        static void Main(string[] args)
        {
            // Dog bingo = new Dog(true, "Bingo", 5);
            // bingo.Speak();
            Chihuahua hero = new Chihuahua(true, "Hero", 7, false);

            hero.Speak();
            GreatDane scooby = new GreatDane(true, "Scooby-Doo", 30, false);

            scooby.Speak();


            List <Dog> dogs = new List <Dog>();

            dogs.Add(hero);
            dogs.Add(scooby);

            dogs.ForEach(d =>
            {
                d.Speak();
                d.Eat("chewToy");
            });
        }
        static void Main(string[] args)
        {
            Console.Clear();
            //   cannot instatiate an abstract class
            //   Dog bingo = new Dog(true, "Bingo", 5);
            //   bingo.Speak();
            Chihuahua hero = new Chihuahua("Hero", true, 7, false);

            hero.Speak();
            GreatDane scooby = new GreatDane(true, "Scooby-Doo", 30, false);

            scooby.Speak();

            List <Dog> dogs = new List <Dog>();

            dogs.Add(hero);
            dogs.Add(scooby);

            dogs.ForEach(d =>
            {
                d.Speak();
                d.Eat("chewToy");
            });
        }
Esempio n. 3
0
 public void YouCanCallBaseEvenFromOtherMethods()
 {
     var george = new GreatDane("George");
     Assert.Equal("WOOF, GROWL", george.Growl());
 }
Esempio n. 4
0
        public void YouCanCallBaseEvenFromOtherMethods()
        {
            var george = new GreatDane("George");

            Assert.Equal("WOOF, GROWL", george.Growl());
        }
        public void YouCanCallBaseEvenFromOtherMethods()
        {
            var george = new GreatDane("George");

            Assert.Equal(FILL_ME_IN, george.Growl());
        }
Esempio n. 6
0
 public void YouCanCallBaseEvenFromOtherMethods()
 {
     var george = new GreatDane("George");
     Assert.Equal(FILL_ME_IN, george.Growl());
 }