예제 #1
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetMatchEvents();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("stats/h5/matches//events", uri);
        }
예제 #2
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetMatchEvents();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("stats/h5/matches//events", uri);
        }
예제 #3
0
        public void GetConstructedUri_ForMatchId_MatchesExpected(string guid)
        {
            var query = new GetMatchEvents()
                        .ForMatchId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"stats/h5/matches/{guid}/events", uri);
        }
예제 #4
0
        public void GetConstructedUri_ForMatchId_MatchesExpected(string guid)
        {
            var query = new GetMatchEvents()
                .ForMatchId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"stats/h5/matches/{guid}/events", uri);
        }
예제 #5
0
        public async Task GetMatchEvents_SchemaIsValid(string guid)
        {
            var weaponsSchema = JSchema.Parse(File.ReadAllText(Config.MatchEventsJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.MatchEventsJsonSchemaPath))
            });

            var query = new GetMatchEvents()
                        .ForMatchId(new Guid(guid))
                        .SkipCache();

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

            SchemaUtility.AssertSchemaIsValid(weaponsSchema, jArray);
        }
예제 #6
0
        public async Task GetMatchEvents_SchemaIsValid(string guid)
        {
            var weaponsSchema = JSchema.Parse(File.ReadAllText(Config.MatchEventsJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.MatchEventsJsonSchemaPath))
            });

            var query = new GetMatchEvents()
                .ForMatchId(new Guid(guid))
                .SkipCache();

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

            SchemaUtility.AssertSchemaIsValid(weaponsSchema, jArray);
        }