public void GetMVPScreenAwardTest() { List <string> assertMessages = new List <string>(); foreach (var map in HeroesIcons.MatchAwards().GetMatchAwardsList()) { if (HeroesIcons.MatchAwards().GetMVPScreenAward(map, MVPScreenColor.Blue, out string awardNameBlue) == null || string.IsNullOrEmpty(awardNameBlue)) { assertMessages.Add($"[Screen Award] [{map}] (blue) Stream is null or no award name"); } if (HeroesIcons.MatchAwards().GetMVPScreenAward(map, MVPScreenColor.Red, out string awardNameRed) == null || string.IsNullOrEmpty(awardNameRed)) { assertMessages.Add($"[Screen Award] [{map}] (red) Stream is null or no award name"); } if (HeroesIcons.MatchAwards().GetMVPScreenAward(map, MVPScreenColor.Gold, out string awardNameGold) == null || string.IsNullOrEmpty(awardNameGold)) { assertMessages.Add($"[Screen Award] [{map}] (gold) Stream is null or no award name"); } } if (HeroesIcons.MatchAwards().GetMVPScreenAward("asdf", MVPScreenColor.Blue, out string awardName) == null || string.IsNullOrEmpty(awardName)) { assertMessages.Add($"[Screen Award] [asdf] (blue) Stream is null or no award name"); } AssertFailMessage(assertMessages); }
public void HeroesMatchAwardsTest() { HeroesIcons heroesIcons = new HeroesIcons(false); List <string> assertMessages = new List <string>(); Assert.AreEqual(heroesIcons.MatchAwards().TotalCountOfAwards(), heroesIcons.MatchAwards().GetMatchAwardsList().Count, "Number of awards in _AllMatchAwards.xml is not equal to number of MatchAwards"); Assert.AreEqual(heroesIcons.MatchAwards().TotalCountOfAwards(), Directory.GetFiles($@"Xml\MatchAwards").Count() - 1, "Number of awards in _AllMatchAwards.xml is not equal to number of files in Xml\\MatchAwards"); foreach (var award in heroesIcons.MatchAwards().GetMatchAwardsList()) { if (heroesIcons.MatchAwards().GetMVPScoreScreenAward(award, MVPScoreScreenColor.Blue, out string awardBlueName) == null) { assertMessages.Add($"No blue MVP score screen award image found for {award}"); } if (heroesIcons.MatchAwards().GetMVPScoreScreenAward(award, MVPScoreScreenColor.Red, out string awardRedName) == null) { assertMessages.Add($"No red MVP score screen award image found for {award}"); } if (heroesIcons.MatchAwards().GetMVPScreenAward(award, MVPScreenColor.Blue, out string awardBlueName2) == null) { assertMessages.Add($"No blue MVP screen award image found for {award}"); } if (heroesIcons.MatchAwards().GetMVPScreenAward(award, MVPScreenColor.Red, out string awardRedName2) == null) { assertMessages.Add($"No red MVP screen award image found for {award}"); } if (heroesIcons.MatchAwards().GetMVPScreenAward(award, MVPScreenColor.Gold, out string awardGoldName2) == null) { assertMessages.Add($"No gold MVP screen award image found for {award}"); } if (string.IsNullOrEmpty(heroesIcons.MatchAwards().GetMatchAwardDescription(award))) { assertMessages.Add($"No description found for {award}"); } } }
private void SetMVPAward(string awardType) { MVPScoreScreenColor teamColor; if (Player.Team == 0) { teamColor = MVPScoreScreenColor.Blue; } else { teamColor = MVPScoreScreenColor.Red; } MvpAward = HeroesIcons.MatchAwards().GetMVPScoreScreenAward(awardType, teamColor, out string mvpAwardName); MvpAwardDescription = $"{mvpAwardName}{Environment.NewLine}{HeroesIcons.MatchAwards().GetMatchAwardDescription(awardType)}"; }
private void SetMVPAward(string awardType) { ScoreScreenAwardColor teamColor; if (Player.Team == 0) { teamColor = ScoreScreenAwardColor.Blue; } else { teamColor = ScoreScreenAwardColor.Red; } MatchAward matchAward = HeroesIcons.MatchAwards(Build).MatchAward(awardType); MvpAward = matchAward.MatchAwardScoreScreenImage(teamColor); MvpAwardDescription = $"{matchAward.Name}{Environment.NewLine}{matchAward.Description}"; }
public void GetMatchAwardDescriptionTest() { List <string> assertMessages = new List <string>(); foreach (var map in HeroesIcons.MatchAwards().GetMatchAwardsList()) { if (string.IsNullOrEmpty(HeroesIcons.MatchAwards().GetMatchAwardDescription(map))) { assertMessages.Add($"[{map}] description is null or empty"); } } if (!string.IsNullOrEmpty(HeroesIcons.MatchAwards().GetMatchAwardDescription("asdf"))) { assertMessages.Add($"[asdf] description is NOT empty"); } AssertFailMessage(assertMessages); }