public void Test_LeaveLobby_LobbyGetsRemovedAfterLastPersonLeaves_Success() { // Setup lobby.Players.Add(account); // Action lobbyController.LeaveLobby(account.Id, lobby.Id); // Assert foreach (Lobby l in lobbyContainer.GetLobbies()) { if (l.Id == lobby.Id) { Assert.Fail("A lobby with the same ID is still in the list"); } } }
/// <summary> /// Gets all the currently active lobbies /// </summary> /// <returns>A list of all currently active lobbies</returns> public IEnumerable <Lobby> GetLobbies() { return(lobbyContainer.GetLobbies()); }