Exemple #1
0
        public void NewGearBoxStartsIn0()
        {
            var result   = _gearbox.S();
            var expected = 0;

            Assert.Equal(expected, result);
        }
Exemple #2
0
        public void GearBoxCreatedWithoutDictionaryCanShiftUp()
        {
            var gearBox = new GearBox();

            gearBox.DoIt(0);
            var result = gearBox.S();

            Assert.Equal(1, result);
        }
Exemple #3
0
        private void ShiftsDownWithRpmLowerThanThreshold(IDictionary <int, int> downDictionary, int startingGear)
        {
            //arrange
            var upDictionary = DefaultUpDict();
            var gearBox      = new GearBox(upDictionary, downDictionary);

            ShiftUpGears(startingGear, gearBox);

            //action
            gearBox.DoIt(downDictionary[startingGear] - 1);
            var result       = gearBox.S();
            var expectedGear = startingGear - 1;

            Assert.Equal(expectedGear, result);
        }