Ejemplo n.º 1
0
        public void openDoor()
        {
            //throws CannotUnlockDoorException, CannotChangeStateOfLockedDoor {
            ThirdPartyDoor door = createThirtPartyDoor();

            //Unlock it
            door.unlock(getThirdPartyDoorCode());
            //Now open it
            door.setState(ThirdPartyDoor.DoorState.OPEN);
            Assert.AreEqual(ThirdPartyDoor.DoorState.OPEN, door.getState());
        }
Ejemplo n.º 2
0
        public void defaultDoorStateShouldBeClosed()
        {
            ThirdPartyDoor door = createThirtPartyDoor();

            Assert.AreEqual(ThirdPartyDoor.DoorState.CLOSED, door.getState());
        }