public void valid_gameListByName() { ClientGame g = gc.getActiveGames("preferences", prefs, "abc")[0];; Assert.NotNull(gc.joinGame(g.getID(), "ohad", 30)); List <ClientGame> games = gc.getActiveGames("playerName", "ohad", "abc"); Assert.AreEqual(1, games.Count); //Assert.True(games[0].GetUserProfiles().Contains(userProf));s }
public void Valid_createGame() { GamePreferences prefs = new GamePreferences(8, 2, 5, 10, 1, 2, 3, true); // ClientUserProfile ohadUser = new ClientUserProfile (new UserProfile("ohad", "213")); us.login("ohad", "213"); gc.createGame(prefs, "ohad"); Assert.AreEqual(gc.getActiveGames("preferences", prefs, "ohad").Count(), 1); us.logout("ohad"); }