Ejemplo n.º 1
0
        public void UserRequestsFloorThatDoesNotExist()
        {
            //Arrange
            int mMaxFloor       = 3;
            int mRequestedFloor = 10;

            //Act
            ElevatorOS_Impl tempElevatorOsImpl = new ElevatorOS_Impl(new ElevatorModule_Impl(mMaxFloor));

            tempElevatorOsImpl.ReqElevatorAtOrToFloor(mRequestedFloor);
            tempElevatorOsImpl.Update();
        }
Ejemplo n.º 2
0
        public void ElevatorReturnsTheFloorThePreviousUserRequestedAndArrivedTo()
        {
            //Arrange
            int mExpectedFloor  = 4;
            int mRequestedFloor = 4;
            int mMaxFloor       = 10;

            //Act
            ElevatorOS_Impl tempElevatorOsImpl = new ElevatorOS_Impl(new ElevatorModule_Impl(mMaxFloor));

            tempElevatorOsImpl.ReqElevatorAtOrToFloor(mRequestedFloor);
            tempElevatorOsImpl.Update();

            //Assert
            Assert.AreEqual(mExpectedFloor, tempElevatorOsImpl._mElevatorModuleImpl.GetCurrentFloor());
        }