// A test that a room can be added to a map with one room in it. @Test public void addToOneRoomTest() { Map m = new Map(); Room firstroom = Mockito.mock(Room.class); Room secondroom = Mockito.mock(Room.class); m.addRoom(firstroom); m.addRoom(secondroom); assertSame(secondroom, m.getLocation().northRoom); }
// A test that a room can be added to an empty map. @Test public void addToEmptyMap() { Map m = new Map(); Room firstroom = Mockito.mock(Room.class); m.addRoom(firstroom); assertSame(firstroom, m.getLocation()); }