public void TestVehicleInheritanceThroughMotorcycle()
        {
            Motorcycle motorcycle = new Motorcycle();
            string     phrase     = motorcycle.Description();

            Assert.Equal("I am a Motorcycle that carries 1 passenger, travels at a speed of 60mph and I have 2 wheels.", phrase);
        }
Example #2
0
        static void MotorcycleMessage()
        {
            Motorcycle motorcycle = new Motorcycle();
            string     phrase     = motorcycle.Description();

            Console.WriteLine(phrase);
            phrase = motorcycle.UsedFor();
            Console.WriteLine(phrase);
            phrase = motorcycle.CatchPhrase();
            Console.WriteLine(phrase);
            Console.WriteLine(" ");
        }