Exemplo n.º 1
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetMedals();

            var uri = query.GetConstructedUri();

            Assert.AreEqual(BaseUri, uri);
        }
Exemplo n.º 2
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetMedals();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/medals", uri);
        }
Exemplo n.º 3
0
        public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetMedals();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/medals", uri);
        }
Exemplo n.º 4
0
        public async Task GetMedals_SchemaIsValid()
        {
            var medalsSchema = JSchema.Parse(File.ReadAllText(Config.MedalJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.MedalJsonSchemaPath))
            });

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

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

            SchemaUtility.AssertSchemaIsValid(medalsSchema, jArray);
        }
Exemplo n.º 5
0
        public async Task GetMedals_SchemaIsValid()
        {
            var medalsSchema = JSchema.Parse(File.ReadAllText(Config.MedalJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.MedalJsonSchemaPath))
            });

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

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

            SchemaUtility.AssertSchemaIsValid(medalsSchema, jArray);
        }