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()); }
public void defaultDoorStateShouldBeClosed() { ThirdPartyDoor door = createThirtPartyDoor(); Assert.AreEqual(ThirdPartyDoor.DoorState.CLOSED, door.getState()); }