示例#1
0
        public void Upshift()
        {
            var currentGear = _gearBox.GetCurrentGear();
            var nextGear    = currentGear.Upshift();

            _gearBox.SetCurrentGear(nextGear);
        }
示例#2
0
        public void Upshift_ShouldSetSecondGear_WhenReceivedFirst()
        {
            var first  = new Gear(1, 5);
            var second = new Gear(2, 5);

            _gearBox.GetCurrentGear().Returns(first);

            Sut().Upshift();

            _gearBox.Received().SetCurrentGear(second);
        }