예제 #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());
        }
예제 #2
0
        public void WhenEconomicModeEnteredEventOccuredCurrentResponsivenessModeChangesToEconomic()
        {
            var dashboardState      = new DashboardStateReadModel();
            var economicModeEntered = new EconomicModeEntered();

            dashboardState.Apply(economicModeEntered);

            Assert.AreEqual(dashboardState.CurrentResponsivenessMode, "ECONOMIC");
        }
예제 #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());
        }
예제 #4
0
        public void WhenComfortModeEnteredEventOccuredCurrentResponsivenessModeChangesToComfort()
        {
            var dashboardState     = new DashboardStateReadModel();
            var comfortModeEntered = new ComfortModeEntered();

            dashboardState.Apply(comfortModeEntered);

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

            dashboardState.Apply(sportModeEntered);

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

            dashboardState.Apply(driveModeEntered);

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

            dashboardState.Apply(neutralModeEntered);

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

            dashboardState.Apply(reverseModeEntered);

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

            dashboardState.Apply(manualGearshiftingModeExited);

            Assert.IsFalse(dashboardState.IsInManualGearshiftingMode);
        }
예제 #10
0
        public void WhenParkModeEnteredEventOccuredCurrentTransmissionModeChangesToPark()
        {
            var dashboardState  = new DashboardStateReadModel();
            var parkModeEntered = new ParkModeEntered();

            dashboardState.Apply(parkModeEntered);

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