public void VehicleNotifiesDashboardOfCurrentTyrePressure()
        {
            var tyrePressureDashboard = new VehicleDashboard();

            Tyres tyres = createVehicleTyres();

            TyrePressureSensorManager tyrePressureManager = new TyrePressureSensorManager(tyres, tyrePressureDashboard);

            tyrePressureManager.MonitorVehicleTyres();

            Assert.IsNotNull(tyrePressureDashboard.messageToUser);
            Assert.IsTrue(tyrePressureDashboard.makeNoiseAtUser);
        }
        public void VehicleAppliesBrakesAndNotifiesDashboardOfCurrentTyrePressureWhenAlarmSounds()
        {
            var vehicleBrakingSystem = new VehicleBrakingSystem();
            var vehicleDashboard     = new VehicleDashboard();

            var tyrePressureAlarmPublisher = new AlarmPublisher();

            tyrePressureAlarmPublisher.RegisterAlarmSubscriber(vehicleBrakingSystem);
            tyrePressureAlarmPublisher.RegisterAlarmSubscriber(vehicleDashboard);

            Tyres tyres = createVehicleTyres();

            TyrePressureSensorManager tyrePressureManager = new TyrePressureSensorManager(tyres, tyrePressureAlarmPublisher);

            tyrePressureManager.MonitorVehicleTyres();

            Assert.IsTrue(vehicleBrakingSystem.EmergencyStop);
            Assert.AreEqual <int>(100, vehicleBrakingSystem.BrakeForceApplied);
            Assert.IsNotNull(vehicleDashboard.messageToUser);
            Assert.IsTrue(vehicleDashboard.makeNoiseAtUser);
        }