private static void SetupSystem(IEventBus eventBus) { _externalSystems = new ExternalSystems(); var externalSystemsAdapter = new ExternalSystemsAdapter(_externalSystems); var gearbox = new Gearbox(); var gearboxAdapter = new GearboxAdapter(gearbox); var automaticGearshifter = new AutomaticGearshifter(gearboxAdapter); eventBus.Attach(new EventLogger()); eventBus.Attach(new EngineEmulator(_externalSystems)); new AntiCorruptionLayerStartup(eventBus, externalSystemsAdapter, gearbox).Start(); new GearshiftStartup(eventBus, automaticGearshifter).Start(); new ProcessesStartup(eventBus, new GearshiftService(new Negotiator(), automaticGearshifter), new EngineCharacteristics(), new KickdownCharacteristics()).Start(); TimeHelper.WaitSeconds(3); }
public GearshiftStartup(IEventBus eventBus, AutomaticGearshifter gearshifter) { _eventBus = eventBus; _gearshifter = gearshifter; }
public void SetUp() { _gearboxMock = new Mock <IGearbox>(); _programMock = new Mock <IShiftingProgram>(); _gearshifter = new AutomaticGearshifter(_gearboxMock.Object); }
public GearshiftService(Negotiator negotiator, AutomaticGearshifter gearshifter) { _negotiator = negotiator; _gearshifter = gearshifter; }