Beispiel #1
0
        public void DoorIsOpenByDefault()
        {
            var room1 = new Room(1);
            var room2 = new Room(2);
            var door = new Door(room1, room2);

            Assert.IsTrue(door.isOpen());
        }
Beispiel #2
0
        public void PlayerCanEnterDoor()
        {
            var room1 = new Room(1);
            var room2 = new Room(2);
            var door = new Door(room1, room2);
            var player = new Player(room1, room2);

            Assert.AreEqual(room2, door.Enter(player));
        }
Beispiel #3
0
        public void DoorCanBeClosedAndOpened()
        {
            var room1 = new Room(1);
            var room2 = new Room(2);
            var door = new Door(room1, room2);

            Assert.IsTrue(door.isOpen());

            door.CloseDoor();

            Assert.IsFalse(door.isOpen());

            door.OpenDoor();

            Assert.IsTrue(door.isOpen());
        }