コード例 #1
0
        public void TheSedanCanreverse()
        {
            //arrange
            Sedan sedan = new Sedan();

            //act

            string output = sedan.Reverse();

            //assert
            Assert.Equal("The car Reverses", output);
        }
コード例 #2
0
        static void ThingsASedanCanDo()
        {
            Sedan sedan = new Sedan();

            Console.WriteLine("-----does a sedan make noise?-----");
            bool output1 = sedan.MakesNoise;

            Console.WriteLine(output1);
            Console.WriteLine("-----does a sedan start?-----");
            bool output2 = sedan.Starts;

            Console.WriteLine(output2);
            Console.WriteLine("-------Does a Sedan honk?------");
            Console.WriteLine(sedan.Honk());
            Console.WriteLine("------Does the car drive?------");
            Console.WriteLine(sedan.DriveForward());
            Console.WriteLine("------Does the car go in reverse?------");
            Console.WriteLine(sedan.Reverse());
            Console.WriteLine("price:");
            Console.WriteLine(sedan.Price);
            Console.WriteLine(sedan.Honk());
        }