Beispiel #1
0
        public void TestNextVehicle()
        {
            if (Vehicles.Count > 0)
            {
                CurrentTestVehicle = Vehicles.Dequeue();
                Console.WriteLine("Vehicle: {0} removed from test queue for testing", CurrentTestVehicle.ID);

                // test interface
                bool passTest = Mgr.TestVehicle(CurrentTestVehicle);
                Console.WriteLine("Test: Vehicle: {0}, Pass: {1}", CurrentTestVehicle.ID, passTest);

                // Requirement: if test fails vehicle is re-added to end of queue.
                if (!passTest)
                {
                    AddVehicle(CurrentTestVehicle);
                    Console.WriteLine("Test: Vehicle: {0} failed test re-added to queue", CurrentTestVehicle.ID);
                }
            }
        }