Beispiel #1
0
        public void TeamXpBreakdownTest()
        {
            List <StormTeamXPBreakdown>?xpBlue  = _stormReplay.GetTeamXPBreakdown(StormTeam.Blue)?.ToList();
            List <StormTeamXPBreakdown>?xpRed   = _stormReplay.GetTeamXPBreakdown(StormTeam.Red)?.ToList();
            List <StormTeamXPBreakdown>?xpOther = _stormReplay.GetTeamXPBreakdown(StormTeam.Observer)?.ToList();

            Assert.AreEqual(20, xpBlue !.Count);
            Assert.AreEqual(20, xpRed !.Count);
            Assert.IsNull(xpOther);

            StormTeamXPBreakdown blue = xpBlue[3];

            Assert.AreEqual(1272, blue.HeroXP);
            Assert.AreEqual(5, blue.Level);
            Assert.AreEqual(360, blue.CreepXP);
            Assert.AreEqual(4868, blue.MinionXP);
            Assert.AreEqual(4100, blue.PassiveXP);
            Assert.AreEqual(0, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(2781250000), blue.Time);
            Assert.AreEqual(10600, blue.TotalXP);

            blue = xpBlue[19];
            Assert.AreEqual(6037, blue.HeroXP);
            Assert.AreEqual(18, blue.Level);
            Assert.AreEqual(4668, blue.CreepXP);
            Assert.AreEqual(21883, blue.MinionXP);
            Assert.AreEqual(22520, blue.PassiveXP);
            Assert.AreEqual(7250, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(12065000000), blue.Time);
            Assert.AreEqual(62358, blue.TotalXP);

            StormTeamXPBreakdown red = xpRed[3];

            Assert.AreEqual(0, red.HeroXP);
            Assert.AreEqual(5, red.Level);
            Assert.AreEqual(225, red.CreepXP);
            Assert.AreEqual(5082, red.MinionXP);
            Assert.AreEqual(4100, red.PassiveXP);
            Assert.AreEqual(0, red.StructureXP);
            Assert.AreEqual(new TimeSpan(2781250000), red.Time);
            Assert.AreEqual(9407, red.TotalXP);

            red = xpRed[19];
            Assert.AreEqual(12729, red.HeroXP);
            Assert.AreEqual(20, red.Level);
            Assert.AreEqual(6083, red.CreepXP);
            Assert.AreEqual(23551, red.MinionXP);
            Assert.AreEqual(22520, red.PassiveXP);
            Assert.AreEqual(8850, red.StructureXP);
            Assert.AreEqual(new TimeSpan(12065000000), red.Time);
            Assert.AreEqual(73733, red.TotalXP);
        }
        public void TeamXpBreakdownTest()
        {
            List <StormTeamXPBreakdown>?xpBlue  = _stormReplay.GetTeamXPBreakdown(StormTeam.Blue)?.ToList();
            List <StormTeamXPBreakdown>?xpRed   = _stormReplay.GetTeamXPBreakdown(StormTeam.Red)?.ToList();
            List <StormTeamXPBreakdown>?xpOther = _stormReplay.GetTeamXPBreakdown(StormTeam.Observer)?.ToList();

            Assert.AreEqual(13, xpBlue !.Count);
            Assert.AreEqual(13, xpRed !.Count);
            Assert.IsNull(xpOther);

            StormTeamXPBreakdown blue = xpBlue[3];

            Assert.AreEqual(0, blue.HeroXP);
            Assert.AreEqual(6, blue.Level);
            Assert.AreEqual(0, blue.CreepXP);
            Assert.AreEqual(7724, blue.MinionXP);
            Assert.AreEqual(4715, blue.PassiveXP);
            Assert.AreEqual(250, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(2781250000), blue.Time);
            Assert.AreEqual(12689, blue.TotalXP);

            blue = xpBlue[12];
            Assert.AreEqual(5849, blue.HeroXP);
            Assert.AreEqual(15, blue.Level);
            Assert.AreEqual(1159, blue.CreepXP);
            Assert.AreEqual(22001, blue.MinionXP);
            Assert.AreEqual(18514, blue.PassiveXP);
            Assert.AreEqual(1300, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(8157500000), blue.Time);
            Assert.AreEqual(48823, blue.TotalXP);

            StormTeamXPBreakdown red = xpRed[3];

            Assert.AreEqual(2160, red.HeroXP);
            Assert.AreEqual(6, red.Level);
            Assert.AreEqual(0, red.CreepXP);
            Assert.AreEqual(6657, red.MinionXP);
            Assert.AreEqual(4715, red.PassiveXP);
            Assert.AreEqual(0, red.StructureXP);
            Assert.AreEqual(new TimeSpan(2781250000), red.Time);
            Assert.AreEqual(13532, red.TotalXP);

            red = xpRed[12];
            Assert.AreEqual(4214, red.HeroXP);
            Assert.AreEqual(15, red.Level);
            Assert.AreEqual(0, red.CreepXP);
            Assert.AreEqual(24203, red.MinionXP);
            Assert.AreEqual(17153, red.PassiveXP);
            Assert.AreEqual(500, red.StructureXP);
            Assert.AreEqual(new TimeSpan(8157500000), red.Time);
            Assert.AreEqual(46070, red.TotalXP);
        }
        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);
        }
Beispiel #4
0
        public void TeamXpBreakdownTest()
        {
            List <StormTeamXPBreakdown>?xpBlue  = _stormReplay.GetTeamXPBreakdown(StormTeam.Blue)?.ToList();
            List <StormTeamXPBreakdown>?xpRed   = _stormReplay.GetTeamXPBreakdown(StormTeam.Red)?.ToList();
            List <StormTeamXPBreakdown>?xpOther = _stormReplay.GetTeamXPBreakdown(StormTeam.Observer)?.ToList();

            Assert.AreEqual(18, xpBlue !.Count);
            Assert.AreEqual(18, xpRed !.Count);
            Assert.IsNull(xpOther);

            StormTeamXPBreakdown blue = xpBlue[0];

            Assert.AreEqual(0, blue.HeroXP);
            Assert.AreEqual(1, blue.Level);
            Assert.AreEqual(0, blue.CreepXP);
            Assert.AreEqual(1200, blue.MinionXP);
            Assert.AreEqual(575, blue.PassiveXP);
            Assert.AreEqual(0, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(981250000), blue.Time);
            Assert.AreEqual(1775, blue.TotalXP);

            blue = xpBlue[13];
            Assert.AreEqual(5470, blue.HeroXP);
            Assert.AreEqual(16, blue.Level);
            Assert.AreEqual(3773, blue.CreepXP);
            Assert.AreEqual(25754, blue.MinionXP);
            Assert.AreEqual(18515, blue.PassiveXP);
            Assert.AreEqual(375, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(8781250000), blue.Time);
            Assert.AreEqual(53887, blue.TotalXP);

            blue = xpBlue[17];
            Assert.AreEqual(10164, blue.HeroXP);
            Assert.AreEqual(19, blue.Level);
            Assert.AreEqual(4121, blue.CreepXP);
            Assert.AreEqual(32032, blue.MinionXP);
            Assert.AreEqual(23621, blue.PassiveXP);
            Assert.AreEqual(375, blue.StructureXP);
            Assert.AreEqual(new TimeSpan(11078750000), blue.Time);
            Assert.AreEqual(70313, blue.TotalXP);

            StormTeamXPBreakdown red = xpRed[0];

            Assert.AreEqual(592, red.HeroXP);
            Assert.AreEqual(2, red.Level);
            Assert.AreEqual(0, red.CreepXP);
            Assert.AreEqual(1360, red.MinionXP);
            Assert.AreEqual(575, red.PassiveXP);
            Assert.AreEqual(0, red.StructureXP);
            Assert.AreEqual(new TimeSpan(981250000), red.Time);
            Assert.AreEqual(2527, red.TotalXP);

            red = xpRed[13];
            Assert.AreEqual(6596, red.HeroXP);
            Assert.AreEqual(18, red.Level);
            Assert.AreEqual(3661, red.CreepXP);
            Assert.AreEqual(31496, red.MinionXP);
            Assert.AreEqual(21288, red.PassiveXP);
            Assert.AreEqual(1425, red.StructureXP);
            Assert.AreEqual(new TimeSpan(8781250000), red.Time);
            Assert.AreEqual(64466, red.TotalXP);

            red = xpRed[17];
            Assert.AreEqual(11379, red.HeroXP);
            Assert.AreEqual(21, red.Level);
            Assert.AreEqual(3661, red.CreepXP);
            Assert.AreEqual(35918, red.MinionXP);
            Assert.AreEqual(29392, red.PassiveXP);
            Assert.AreEqual(2350, red.StructureXP);
            Assert.AreEqual(new TimeSpan(11078750000), red.Time);
            Assert.AreEqual(82700, red.TotalXP);
        }