Exemplo n.º 1
0
        public void WhenParkModeEnteredEventOccuredCurrentTransmissionModeChangesToPark()
        {
            var dashboardState  = new DashboardStateReadModel();
            var parkModeEntered = new ParkModeEntered();

            dashboardState.Apply(parkModeEntered);

            Assert.AreEqual(dashboardState.CurrentTransmissionMode, "PARK");
        }
        public void WhenParkModeEnteredEventOccuredGearboxChangeToParkState()
        {
            var leverMock = new Mock <ILever>();
            var listener  = new TransmissionEventListener(leverMock.Object);
            var @event    = new ParkModeEntered();

            listener.HandleEvent(@event);

            leverMock.Verify(x => x.SetParkMode(), Times.Once);
        }