Exemple #1
0
        static void ThingsAReallyReallyLongBusCanDo()
        {
            ReallyReallyLongBus bus = new ReallyReallyLongBus();

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

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

            Console.WriteLine(output2);
            Console.WriteLine("======Does a ReallyReallyLongBu honk?======");
            Console.WriteLine(bus.Honk());
            Console.WriteLine("======Does a ReallyReallyLongBu turn on?======");
            Console.WriteLine(bus.TurnOn());
            Console.WriteLine("======Does the ReallyReallyLongBu drive?======");
            Console.WriteLine(bus.DriveForward());
            Console.WriteLine("======Does the ReallyReallyLongBu go in reverse?======");
            Console.WriteLine(bus.Reverse());
            Console.WriteLine("======Does a ReallyReallyLongBu turn off?======");
            Console.WriteLine(bus.TurnOff());
            Console.WriteLine("price:");
            Console.WriteLine(bus.Price);
        }
        public void ReallyReallyLongBusCanHonk()
        {
            //arrange
            ReallyReallyLongBus rl = new ReallyReallyLongBus();
            string output          = rl.Honk();


            //assert
            Assert.Equal("BEEP BEEP", output);
        }