public void TestGettingAccessToken() { string nicknamePlayer = "Hunterlan2000"; int expectedIdPlayer = 30373360; List <Player> players = accounts.GetPlayers(apiKey, nicknamePlayer, null); if (players.Count > 1) { Assert.Fail("Count of players more than one!"); } else if (players[0].AccountId != expectedIdPlayer || !string.Equals(players[0].Nickname, nicknamePlayer)) { string message = string.Concat("Wrong data.\nExpected player: ", nicknamePlayer, " ", expectedIdPlayer, "\nReal player: ", players[0].Nickname, " ", players[0].AccountId); Assert.Fail(message); } else { Assert.Pass(); } }
public void CauseError() { string nicknamePlayer = ""; List <Player> players = accounts.GetPlayers(apiKey, nicknamePlayer, null); }