Exemplo n.º 1
0
        public void Upshift_ShouldReturnSameGear_WhenOnFirstDrive()
        {
            var currentGear = new Gear(1, 5);

            var result = currentGear.Downshift();

            result.Should().Be(currentGear);
        }
Exemplo n.º 2
0
        public void Downshift_ShouldNotChangeGear_WhenOnNeutralOrReverseGear(int reverseOrNeutralGear)
        {
            var currentGear = new Gear(reverseOrNeutralGear, 5);

            var result = currentGear.Downshift();

            result.Should().Be(currentGear);
        }
Exemplo n.º 3
0
        public void Downshift_ShouldReturnPreviousGear_WhenNotOnFirstDrive()
        {
            var currentGear      = new Gear(2, 5);
            var expectedNextGear = new Gear(1, 5);

            var result = currentGear.Downshift();

            result.Should().Be(expectedNextGear);
        }