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

            var uri = query.GetConstructedUri();

            Assert.AreEqual(BaseUri, uri);
        }
Пример #2
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetCommendations();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/commendations", uri);
        }
Пример #3
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetCommendations();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/commendations", uri);
        }
Пример #4
0
        public async Task GetCommendations_SchemaIsValid()
        {
            var commendationsSchema = JSchema.Parse(File.ReadAllText(Config.CommendationJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.CommendationJsonSchemaPath))
            });

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

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

            SchemaUtility.AssertSchemaIsValid(commendationsSchema, jArray);
        }
Пример #5
0
        public async Task GetCommendations_SchemaIsValid()
        {
            var commendationsSchema = JSchema.Parse(File.ReadAllText(Config.CommendationJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.CommendationJsonSchemaPath))
            });

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

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

            SchemaUtility.AssertSchemaIsValid(commendationsSchema, jArray);
        }