public static Summoner GetSummonerInfo(string region, string summonerName) { string summonerUrl = RiotUrl.GetSummonerUrl("euw1", summonerName); Summoner currentSummoner = JsonSettings.GetStats <Summoner>(summonerUrl); return(currentSummoner); }
public void Test_GetStats_Struct_Hero_End() { RootObject actual = JsonSettings.GetStats <RootObject>("https://ow-api.herokuapp.com/stats/pc/us/Quadzilla-21122"); var actualString = actual.Portrait; const string expected = ("https://d1u1mce87gyfbn.cloudfront.net/game/unlocks/0x0250000000000BB8.png"); Assert.AreEqual(actualString, expected); }
public void Test_Struct_Hero() { var actual = JsonSettings.GetStats <RootObject>("https://ow-api.herokuapp.com/profile/pc/us/Quadzilla-21122"); var actualName = actual.Username; const string expected = ("Quadzilla"); Assert.AreEqual(expected, actualName); }
public void Test_GetStats_struct_Hero2() { var actual = JsonSettings.GetStats <Root>("https://ow-api.herokuapp.com/profile/pc/us/Quadzilla-21122"); var actualString = actual.Username; const string expected = "Quadzilla"; Assert.AreEqual(actualString, expected); }
public void Test_GetStats_Pass2() { var actual = JsonSettings.GetStats <Summoner>("https://euw1.api.riotgames.com/lol/summoner/v3/summoners/by-name/MLPQuadzilla?api_key=" + _apiKey); var actualName = actual.Name; const string expected = ("MLPQuadzilla"); Assert.AreEqual(actualName, expected); }
public void Test_GetStats_Fail() { Summoner actual = JsonSettings.GetStats <Summoner>("https://euw1.api.riotgames.com/lol/summoner/v3/summoners/by-name/kgbbí?api_key=" + _apiKey); var actualName = actual.Name; const string expected = ("Notorious Nutz"); Assert.AreNotEqual(actualName, expected); }