public void Upshift() { var currentGear = _gearBox.GetCurrentGear(); var nextGear = currentGear.Upshift(); _gearBox.SetCurrentGear(nextGear); }
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); }