Exemplo n.º 1
0
        public void WhenRPMChangedEventOccuredCurrentRPMChanges()
        {
            var dashboardState = new DashboardStateReadModel();
            var rpmChanged     = new RpmChanged(new Rpm(1500), new Rpm(1500d));

            dashboardState.Apply(rpmChanged);

            Assert.AreEqual(dashboardState.CurrentRpm, 1500d.ToString());
        }
Exemplo n.º 2
0
        public void WhenEconomicModeEnteredEventOccuredCurrentResponsivenessModeChangesToEconomic()
        {
            var dashboardState      = new DashboardStateReadModel();
            var economicModeEntered = new EconomicModeEntered();

            dashboardState.Apply(economicModeEntered);

            Assert.AreEqual(dashboardState.CurrentResponsivenessMode, "ECONOMIC");
        }
Exemplo n.º 3
0
        public void WhenAggressivenessLevelSelectedEventOccuredCurrentAggressivenessLevelChanges()
        {
            var dashboardState = new DashboardStateReadModel();
            var aggressivenessLevelSelected = new AggressivenessLevelSelected(AggressivenessLevel.Second);

            dashboardState.Apply(aggressivenessLevelSelected);

            Assert.AreEqual(dashboardState.CurrentAggressivenessLevel, AggressivenessLevel.Second.ToString());
        }
Exemplo n.º 4
0
        public void WhenComfortModeEnteredEventOccuredCurrentResponsivenessModeChangesToComfort()
        {
            var dashboardState     = new DashboardStateReadModel();
            var comfortModeEntered = new ComfortModeEntered();

            dashboardState.Apply(comfortModeEntered);

            Assert.AreEqual(dashboardState.CurrentResponsivenessMode, "COMFORT");
        }
Exemplo n.º 5
0
        public void WhenSportModeEnteredEventOccuredCurrentResponsivenessModeChangesToSport()
        {
            var dashboardState   = new DashboardStateReadModel();
            var sportModeEntered = new SportModeEntered();

            dashboardState.Apply(sportModeEntered);

            Assert.AreEqual(dashboardState.CurrentResponsivenessMode, "SPORT");
        }
Exemplo n.º 6
0
        public void WhenDriveModeEnteredEventOccuredCurrentTransmissionModeChangesToDrive()
        {
            var dashboardState   = new DashboardStateReadModel();
            var driveModeEntered = new DriveModeEntered();

            dashboardState.Apply(driveModeEntered);

            Assert.AreEqual(dashboardState.CurrentTransmissionMode, "DRIVE");
        }
Exemplo n.º 7
0
        public void WhenNeutralModeEnteredEventOccuredCurrentTransmissionModeChangesToNeutral()
        {
            var dashboardState     = new DashboardStateReadModel();
            var neutralModeEntered = new NeutralModeEntered();

            dashboardState.Apply(neutralModeEntered);

            Assert.AreEqual(dashboardState.CurrentTransmissionMode, "NEUTRAL");
        }
Exemplo n.º 8
0
        public void WhenReverseModeEnteredEventOccuredCurrentTransmissionModeChangesToReverse()
        {
            var dashboardState     = new DashboardStateReadModel();
            var reverseModeEntered = new ReverseModeEntered();

            dashboardState.Apply(reverseModeEntered);

            Assert.AreEqual(dashboardState.CurrentTransmissionMode, "REVERSE");
        }
Exemplo n.º 9
0
        public void WhenManualGearshiftingModeEnteredEventOccuredManualModeIsDisabled()
        {
            var dashboardState = new DashboardStateReadModel();
            var manualGearshiftingModeExited = new ManualGearshiftingModeExited();

            dashboardState.Apply(manualGearshiftingModeExited);

            Assert.IsFalse(dashboardState.IsInManualGearshiftingMode);
        }
Exemplo n.º 10
0
        public void WhenParkModeEnteredEventOccuredCurrentTransmissionModeChangesToPark()
        {
            var dashboardState  = new DashboardStateReadModel();
            var parkModeEntered = new ParkModeEntered();

            dashboardState.Apply(parkModeEntered);

            Assert.AreEqual(dashboardState.CurrentTransmissionMode, "PARK");
        }