Ejemplo n.º 1
0
        public void AddExitCallsAddExitOnGameExits_UnLockedDoor()
        {
            IGame game      = new Game();
            var   roomExits = new RoomExitsStub();
            var   room      = new Room(roomExits, game);
            var   room2     = new Room("name2", "description2", null);

            room.AddExit(Direction.North, room2, false);

            Assert.AreEqual(1, roomExits.AddExitCounter);
        }
Ejemplo n.º 2
0
        public void AddExitCallsAddsExitWithReturn_UnLockedDoor()
        {
            IGame game       = new Game();
            var   roomExits  = new RoomExitsStub();
            var   roomExits2 = new RoomExitsStub();

            var room  = new Room(roomExits, game);
            var room2 = new Room(roomExits2, game);

            room.AddExit(Direction.North, room2);

            Assert.AreEqual(1, roomExits.AddExitCounter);
            Assert.AreEqual(1, roomExits2.AddExitCounter);
        }
Ejemplo n.º 3
0
        public void AddExitCallsAddExitOnGameExits()
        {
            IGame game      = new Game();
            var   roomExits = new RoomExitsStub();
            var   room      = new Room(roomExits, game);
            var   room2     = new Room("name2", "description2", null);

            DoorWay doorway = new DoorWay
            {
                Direction = Direction.North
            };

            room.AddExit(doorway, room2, false);

            Assert.AreEqual(1, roomExits.AddExitCounter);
        }
Ejemplo n.º 4
0
        public void AddExitCallsAddsExitWithReturn()
        {
            IGame game       = new Game();
            var   roomExits  = new RoomExitsStub();
            var   roomExits2 = new RoomExitsStub();

            var room  = new Room(roomExits, game);
            var room2 = new Room(roomExits2, game);

            DoorWay doorway = new DoorWay
            {
                Direction = Direction.North
            };

            room.AddExit(doorway, room2);

            Assert.AreEqual(1, roomExits.AddExitCounter);
            Assert.AreEqual(1, roomExits2.AddExitCounter);
        }