コード例 #1
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetCampaignMissions();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/campaign-missions", uri);
        }
コード例 #2
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetCampaignMissions();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/campaign-missions", uri);
        }
コード例 #3
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetCampaignMissions();

            var uri = query.GetConstructedUri();

            Assert.AreEqual(BaseUri, uri);
        }
コード例 #4
0
        public async Task GetCampaignMissions_SchemaIsValid()
        {
            var campaignMissionsSchema = JSchema.Parse(File.ReadAllText(Config.CampaignMissionsJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.CampaignMissionsJsonSchemaPath))
            });

            var query = new GetCampaignMissions()
               .SkipCache();

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

            SchemaUtility.AssertSchemaIsValid(campaignMissionsSchema, jArray);
        }
コード例 #5
0
        public async Task GetCampaignMissions_SchemaIsValid()
        {
            var campaignMissionsSchema = JSchema.Parse(File.ReadAllText(Config.CampaignMissionsJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.CampaignMissionsJsonSchemaPath))
            });

            var query = new GetCampaignMissions()
                        .SkipCache();

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

            SchemaUtility.AssertSchemaIsValid(campaignMissionsSchema, jArray);
        }