예제 #1
0
        public void CanTacomaReturnBoolFromHaulTrailer()
        {
            ToyotaTacoma tacoma        = new ToyotaTacoma();
            int          numOfTrailers = 1;

            Assert.True(tacoma.HaulTrailer(numOfTrailers));
        }
예제 #2
0
        public void CanReturnBoolFromCarriesPeople()
        {
            // Arrange
            ToyotaTacoma tacoma = new ToyotaTacoma();

            // Assert
            Assert.True(tacoma.CarriesPeople);
        }
예제 #3
0
        public void CanTacomaImplementIStartEngine()
        {
            ToyotaTacoma tacoma = new ToyotaTacoma();

            Assert.True(tacoma.PrimeEngine());
        }
예제 #4
0
        public void CanReturnBoolTrueFromGoOffRoading()
        {
            ToyotaTacoma tacoma = new ToyotaTacoma();

            Assert.True(tacoma.GoOffRoading());
        }
예제 #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello from the Main method!");

            //////////////////////////////////////////////////
            Console.WriteLine("////////////////////////");
            Console.WriteLine(" ");
            Console.WriteLine("ToyotaTacoma class");
            Console.WriteLine(" ");

            ToyotaTacoma tacoma = new ToyotaTacoma();

            tacoma.Drive();
            tacoma.HaulTrailer(1);

            // Tests that overridden boolean property works
            if (tacoma.GoOffRoading())
            {
                Console.WriteLine("Offroading method works!");
            }

            Console.WriteLine(tacoma.Price);
            Console.WriteLine(tacoma.NumberOfSeats);

            //////////////////////////////////////////////////
            Console.WriteLine("////////////////////////");
            Console.WriteLine(" ");
            Console.WriteLine("MackSemi class");
            Console.WriteLine(" ");

            MackSemi semi = new MackSemi();

            Console.WriteLine(semi.NumberOfSeats);
            Console.WriteLine(semi.Price);
            semi.HaulTrailer(2);
            semi.GoOffRoading();
            Console.WriteLine(semi.FuelType);
            semi.Drive();

            semi.PrimeEngine();

            //////////////////////////////////////////////////
            Console.WriteLine("////////////////////////");
            Console.WriteLine(" ");
            Console.WriteLine("HondaCrv class");
            Console.WriteLine(" ");

            HondaCrv crv = new HondaCrv();

            Console.WriteLine(crv.NumberOfSeats);
            Console.WriteLine(crv.Price);
            Console.WriteLine(crv.FuelType);
            Console.WriteLine(crv.PlayRadio());
            crv.Drive();

            crv.PrimeEngine();

            //////////////////////////////////////////////////
            Console.WriteLine("////////////////////////");
            Console.WriteLine(" ");
            Console.WriteLine("VolvoV70class");
            Console.WriteLine(" ");

            VolvoV70 v70 = new VolvoV70();

            Console.WriteLine(v70.NumberOfSeats);
            Console.WriteLine(v70.SunRoof);

            v70.Drive();
            v70.OpenBackHatch();
            v70.PlayRadio();

            // Interface method
            v70.Transmission();

            // Interface property
            Console.WriteLine(v70.Speeds);

            //////////////////////////////////////////////////
            Console.WriteLine("////////////////////////");
            Console.WriteLine(" ");
            Console.WriteLine("SubaruLegacy class");
            Console.WriteLine(" ");

            SubaruLegacy subby = new SubaruLegacy();

            Console.WriteLine(subby.CarriesPeople);
            Console.WriteLine(subby.Price);
            Console.WriteLine(subby.NumberOfSeats);
            Console.WriteLine(subby.PlayRadio());
            subby.OpenBackHatch();

            // Interface method
            subby.Transmission();
            Console.WriteLine(subby.Speeds);

            //////////////////////////////////////////////////
            Console.WriteLine("\nHit Enter to exit program");
            Console.ReadLine();
        }