public void CheckElevator_IsOnline_AfterStart() { IElevator myElevator = new MyElevator(numberOfFloors: 3); myElevator.Start(initialFloor: 1); Assert.IsTrue(myElevator.IsOnline); }
public void WhenLiftRequest_onMiddleFloor_withLiftOnMiddleFloor_opensDoor() { IElevator myElevator = new MyElevator(numberOfFloors: 3); myElevator.Start(initialFloor: 2); myElevator.RequestLift(floor: 2); Assert.IsTrue(myElevator.DoorsOpened); }
public void WhenLiftRequest_onMiddleFloor_withLiftNotMiddleFloor_keepsDoorClosed() { IElevator myElevator = new MyElevator(numberOfFloors: 3); myElevator.Start(initialFloor: 1); myElevator.RequestLift(floor: 2); Assert.IsFalse(myElevator.DoorsOpened); }
public void AfterRequestLift_ElevatorMoves_ToRequestFloor() { IElevator myElevator = new MyElevator(numberOfFloors: 3); myElevator.Start(initialFloor: 3); myElevator.RequestLift(floor: 1); Assert.IsTrue(myElevator.IsMoving); }
public void InitializeElevator_withTwoFloors() { IElevator myElevator = new MyElevator(numberOfFloors: 2); Assert.AreEqual(2, myElevator.NumberOfFloors); }
public void CheckElevator_IsOffline_BeforeStart() { IElevator myElevator = new MyElevator(numberOfFloors: 3); Assert.IsFalse(myElevator.IsOnline); }