public void GetConstructedUri_NoParameters_MatchesExpected() { var query = new GetMatchEvents(); var uri = query.GetConstructedUri(); Assert.AreEqual("stats/h5/matches//events", uri); }
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); }
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); }
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); }