public void MediatorTestCase()
        {
            var ems = new EngineManagementSystem();
            var ignition = new Ignition(ems);
            var accelerator = new Accelerator(ems);
            var brake = new Brake(ems);
            var gearbox = new GearBox(ems);

            //Log
            ignition.Start();
            accelerator.AccelerateToSpeed(40);
            accelerator.AccelerateToSpeed(80);
            brake.Apply();
            ignition.Stop();
            //todo: define tests
        }
Ejemplo n.º 2
0
 public virtual void RegisterAccelerator(Accelerator accelerator)
 {
     _accelerator = accelerator;
 }