Esempio n. 1
0
        public void WhenManualGearshiftingModeEnteredStartTargetingGear()
        {
            var serviceMock = new Mock <IGearshiftService>();
            var process     = new ManualModeProgramUpdatingProcess(serviceMock.Object);

            process.ApplyEvent(new GearChanged(new Gear(2), new Gear(3)));
            process.ApplyEvent(new ManualGearshiftingModeEntered());

            serviceMock.Verify(x => x.TargetGear(new Gear(2)), Times.Once);
        }
Esempio n. 2
0
        public void WhenGearDownshiftedManuallyGearIsDownshifted()
        {
            var serviceMock = new Mock <IGearshiftService>();
            var process     = new ManualModeProgramUpdatingProcess(serviceMock.Object);

            process.ApplyEvent(new GearChanged(new Gear(2), new Gear(3)));
            process.ApplyEvent(new ManualGearshiftingModeEntered());
            process.ApplyEvent(new GearUpshiftedManually());

            serviceMock.Verify(x => x.TargetGear(new Gear(2)));
        }