public void TeamLevelsTest() { List <StormTeamLevel> levelsBlue = _stormReplay.GetTeamLevels(StormTeam.Blue) !.ToList(); List <StormTeamLevel> levelsRed = _stormReplay.GetTeamLevels(StormTeam.Red) !.ToList(); Assert.AreEqual(18, levelsBlue.Count); Assert.AreEqual(20, levelsRed.Count); Assert.AreEqual(1, levelsBlue[0].Level); Assert.AreEqual(new TimeSpan(32500000), levelsBlue[0].Time); Assert.AreEqual(8, levelsBlue[7].Level); Assert.AreEqual(new TimeSpan(3701875000), levelsBlue[7].Time); Assert.AreEqual(18, levelsBlue[17].Level); Assert.AreEqual(new TimeSpan(11347500000), levelsBlue[17].Time); Assert.AreEqual(1, levelsRed[0].Level); Assert.AreEqual(new TimeSpan(32500000), levelsRed[0].Time); Assert.AreEqual(10, levelsRed[9].Level); Assert.AreEqual(new TimeSpan(5124375000), levelsRed[9].Time); Assert.AreEqual(20, levelsRed[19].Level); Assert.AreEqual(new TimeSpan(11850625000), levelsRed[19].Time); }
public void TeamLevelsTest() { List <StormTeamLevel>?levelsBlue = _stormReplay.GetTeamLevels(StormTeam.Blue)?.ToList(); List <StormTeamLevel>?levelsBlue2 = _stormReplay.GetTeamLevels(StormTeam.Blue)?.ToList(); List <StormTeamLevel>?levelsRed = _stormReplay.GetTeamLevels(StormTeam.Red)?.ToList(); List <StormTeamLevel>?levelsRed2 = _stormReplay.GetTeamLevels(StormTeam.Red)?.ToList(); List <StormTeamLevel>?levelsOther = _stormReplay.GetTeamLevels(StormTeam.Observer)?.ToList(); Assert.AreEqual(19, levelsBlue !.Count); Assert.AreEqual(19, levelsBlue2 !.Count); Assert.AreEqual(21, levelsRed !.Count); Assert.AreEqual(21, levelsRed2 !.Count); Assert.IsNull(levelsOther); Assert.AreEqual(1, levelsBlue[0].Level); Assert.AreEqual(new TimeSpan(32500000), levelsBlue[0].Time); Assert.AreEqual(8, levelsBlue[7].Level); Assert.AreEqual(new TimeSpan(3283125000), levelsBlue[7].Time); Assert.AreEqual(18, levelsBlue[17].Level); Assert.AreEqual(new TimeSpan(9587500000), levelsBlue[17].Time); Assert.AreEqual(1, levelsRed[0].Level); Assert.AreEqual(new TimeSpan(32500000), levelsRed[0].Time); Assert.AreEqual(10, levelsRed[9].Level); Assert.AreEqual(new TimeSpan(3693750000), levelsRed[9].Time); Assert.AreEqual(20, levelsRed[19].Level); Assert.AreEqual(new TimeSpan(9930625000), levelsRed[19].Time); }
private static void NoTrackerEvents(StormReplayResult result) { StormReplay replay = result.Replay !; Assert.IsNull(result.Replay.MapInfo.MapId); Assert.AreEqual(0, replay.TrackerEvents.Count); Assert.IsNull(replay.GetTeamLevels(StormTeam.Blue)); Assert.IsNull(replay.GetTeamLevels(StormTeam.Red)); Assert.IsNull(replay.GetTeamXPBreakdown(StormTeam.Blue)); Assert.IsNull(replay.GetTeamXPBreakdown(StormTeam.Red)); Assert.AreEqual(0, replay.DraftPicks.Count); List <StormPlayer> players = replay.StormPlayers.ToList(); Assert.IsNull(players[0].Talents[0].TalentNameId); Assert.IsNull(players[0].ScoreResult); Assert.IsNull(players[0].MatchAwards); Assert.IsNull(players[0].MatchAwardsCount); }
public void TeamLevelsTest() { List <StormTeamLevel> levelsBlue = _stormReplay.GetTeamLevels(StormTeam.Blue) !.ToList(); List <StormTeamLevel> levelsRed = _stormReplay.GetTeamLevels(StormTeam.Red) !.ToList(); Assert.AreEqual(15, levelsBlue.Count); Assert.AreEqual(15, levelsRed.Count); Assert.AreEqual(1, levelsBlue[0].Level); Assert.AreEqual(new TimeSpan(32500000), levelsBlue[0].Time); Assert.AreEqual(8, levelsBlue[7].Level); Assert.AreEqual(new TimeSpan(3390625000), levelsBlue[7].Time); Assert.AreEqual(1, levelsRed[0].Level); Assert.AreEqual(new TimeSpan(32500000), levelsRed[0].Time); Assert.AreEqual(10, levelsRed[9].Level); Assert.AreEqual(new TimeSpan(4350625000), levelsRed[9].Time); }