Beispiel #1
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetEnemies();

            var uri = query.GetConstructedUri();

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

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/enemies", uri);
        }
Beispiel #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);
        }
        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);
        }