Esempio n. 1
0
        public async void ProvideValidMatchId_ValidData()
        {
            var result =
                await HaloApiService.GetArenaPostGameCarnageReport(new Guid("3f35f75c-aee4-437a-9b49-535ba2e5f186"));

            Assert.IsTrue(result.PlayerStats.Any(ps => ps.Player.Gamertag == "Glitch100"));
        }
Esempio n. 2
0
        public async void ProvideValidMatchId_MetaCommendationDeltasAreSet(string matchId)
        {
            var result = await HaloApiService.GetArenaPostGameCarnageReport(new Guid(matchId));

            // The player earned the final level of the "Storm the Walls" Meta commendation
            var player = result.PlayerStats.FirstOrDefault(ps => ps.Player.Gamertag == "N 2the eighbor");

            Assert.IsNotNull(player, "Player should exist in results");
            var guid = player.MetaCommendationDeltas.First().PreviousMetRequirements.First().Guid;

            Assert.AreEqual(new Guid("af14745e-776d-4307-8e1d-3c0fa0520464"), guid, "Requirement guid should be correct");
        }
Esempio n. 3
0
        public async void ProvideValidMatchId_PlayersDoesntHaveRandom()
        {
            var result = await HaloApiService.GetArenaPostGameCarnageReport(_validGuid);

            Assert.IsFalse(result.PlayerStats.Any(ps => ps.Player.Gamertag == "CCCCCCCCCCCCCCCCCCCC"));
        }
Esempio n. 4
0
        public async void ProvideValidMatchId_CanRetrieveKnownImpulse()
        {
            var result = await HaloApiService.GetArenaPostGameCarnageReport(new Guid("e46d0c1a-9962-44eb-a003-6fac499b0e08"));

            Assert.IsTrue(result.PlayerStats.Any(ps => ps.Player.Gamertag == "Glitch100"));
        }
Esempio n. 5
0
        public async void ProvideValidMatchId_PlayersHasKnownGamer()
        {
            var result = await HaloApiService.GetArenaPostGameCarnageReport(_validGuid);

            Assert.IsTrue(result.PlayerStats.Any(ps => ps.Player.Gamertag == "Glitch100"));
        }
Esempio n. 6
0
 public async void ProvideInvalidMatchId_ThrowsException(string matchId)
 {
     Assert.Throws <HaloAPIException>(
         async() => await HaloApiService.GetArenaPostGameCarnageReport(new Guid(matchId)),
         CommonErrorMessages.InvalidMatchId);
 }
Esempio n. 7
0
        public async void Default_DoesNotReturnNull()
        {
            var result = await HaloApiService.GetArenaPostGameCarnageReport(_validGuid);

            Assert.IsNotNull(result);
        }
Esempio n. 8
0
 public void Default_DoesNotThrowException()
 {
     Assert.DoesNotThrow(async() => await HaloApiService.GetArenaPostGameCarnageReport(_validGuid));
 }