public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetCampaignMatchDetails();

            var uri = query.GetConstructedUri();

            Assert.AreEqual(BaseUri, uri);
        }
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetCampaignMatchDetails();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("stats/h5/campaign/matches/", uri);
        }
예제 #3
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetCampaignMatchDetails();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("stats/h5/campaign/matches/", uri);
        }
        public void GetConstructedUri_ForMatchId_MatchesExpected(string guid)
        {
            var query = new GetCampaignMatchDetails()
                .ForMatchId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"{BaseUri}{guid}", uri);
        }
예제 #5
0
        public void GetConstructedUri_ForMatchId_MatchesExpected(string guid)
        {
            var query = new GetCampaignMatchDetails()
                        .ForMatchId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"stats/h5/campaign/matches/{guid}", uri);
        }
예제 #6
0
        public async Task GetCampaignMatchDetails_SchemaIsValid(string guid)
        {
            var weaponsSchema = JSchema.Parse(File.ReadAllText(Config.CampaignMatchJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.CampaignMatchJsonSchemaPath))
            });

            var query = new GetCampaignMatchDetails()
                        .ForMatchId(new Guid(guid));

            var jArray = await Global.Session.Get <JObject>(query.GetConstructedUri());

            SchemaUtility.AssertSchemaIsValid(weaponsSchema, jArray);
        }
        public async Task GetCampaignMatchDetails_SchemaIsValid(string guid)
        {
            var weaponsSchema = JSchema.Parse(File.ReadAllText(Config.CampaignMatchJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.CampaignMatchJsonSchemaPath))
            });

            var query = new GetCampaignMatchDetails()
                .ForMatchId(new Guid(guid));

            var jArray = await Global.Session.Get<JObject>(query.GetConstructedUri());

            SchemaUtility.AssertSchemaIsValid(weaponsSchema, jArray);
        }