Esempio n. 1
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetEnemies();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/enemies", uri);
        }
Esempio n. 2
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetEnemies();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/enemies", uri);
        }
Esempio n. 3
0
        public async Task GetEnemies_SchemaIsValid()
        {
            var enemiesSchema = JSchema.Parse(File.ReadAllText(Config.EnemyJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.EnemyJsonSchemaPath))
            });

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

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

            SchemaUtility.AssertSchemaIsValid(enemiesSchema, jArray);
        }
Esempio n. 4
0
        public async Task GetEnemies_SchemaIsValid()
        {
            var enemiesSchema = JSchema.Parse(File.ReadAllText(Config.EnemyJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.EnemyJsonSchemaPath))
            });

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

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

            SchemaUtility.AssertSchemaIsValid(enemiesSchema, jArray);
        }