public void SummonedFromBelow_OpensAtFloorSummonedFrom() { const int startingFloor = 10; var sut = new LiftController(startingFloor, this); const int floorSummonedFrom = 1; sut.Summon(floorSummonedFrom); TestHelpers.PassTime(sut, startingFloor, floorSummonedFrom); _stopsVisited.AssertThatLiftStopsAtFloor(floorSummonedFrom); }
public void SummonedFromAbove_OpensAtFloorSummonedFrom() { const int startingFloor = 1; var sut = new LiftController(startingFloor, this); const int floorSummonedFrom = 10; sut.Summon(floorSummonedFrom); TestHelpers.PassTime(sut, floorSummonedFrom, startingFloor); Assert.That(_stopsVisited.Contains(floorSummonedFrom), Is.True); }
public void SummonedTheRequestAnotherFloor_LiftVisitsBothFloors() { const int startingFloor = 1; var sut = new LiftController(startingFloor, this); const int floorSummonedFrom = 10; sut.Summon(floorSummonedFrom); TestHelpers.PassTime(sut, floorSummonedFrom, startingFloor); const int requestedFloor = startingFloor; sut.Request(requestedFloor); TestHelpers.PassTime(sut, floorSummonedFrom, requestedFloor); _stopsVisited.AssertThatLiftStopsAtFloor(new[] { floorSummonedFrom, requestedFloor }); }