public void GetConstructedUri_NoParamaters_MatchesExpected() { var query = new GetWarzoneServiceRecord(); var uri = query.GetConstructedUri(); Assert.AreEqual("stats/h5/servicerecords/warzone", uri); }
public void GetConstructedUri_NoParamaters_MatchesExpected() { var query = new GetWarzoneServiceRecord(); var uri = query.GetConstructedUri(); Assert.AreEqual("stats/h5/servicerecords/warzone", uri); }
public void GetConstructedUri_ForPlayers_MatchesExpected(string gamertag, string gamertag2) { var query = new GetWarzoneServiceRecord() .ForPlayers(new List<string> { gamertag, gamertag2 }); var uri = query.GetConstructedUri(); Assert.AreEqual($"stats/h5/servicerecords/warzone?players={gamertag},{gamertag2}", uri); }
public void GetConstructedUri_ForPlayer_MatchesExpected(string gamertag) { var query = new GetWarzoneServiceRecord() .ForPlayer(gamertag); var uri = query.GetConstructedUri(); Assert.AreEqual($"stats/h5/servicerecords/warzone?players={gamertag}", uri); }
public async Task GetWarzoneServiceRecord_SchemaIsValid(string gamertag) { var weaponsSchema = JSchema.Parse(File.ReadAllText(Config.WarzoneServiceRecordJsonSchemaPath), new JSchemaReaderSettings { Resolver = new JSchemaUrlResolver(), BaseUri = new Uri(Path.GetFullPath(Config.WarzoneServiceRecordJsonSchemaPath)) }); var query = new GetWarzoneServiceRecord() .ForPlayer(gamertag); var jArray = await Global.Session.Get <JObject>(query.GetConstructedUri()); SchemaUtility.AssertSchemaIsValid(weaponsSchema, jArray); }
public async Task GetWarzoneServiceRecord_SchemaIsValid(string gamertag) { var weaponsSchema = JSchema.Parse(File.ReadAllText(Config.WarzoneServiceRecordJsonSchemaPath), new JSchemaReaderSettings { Resolver = new JSchemaUrlResolver(), BaseUri = new Uri(Path.GetFullPath(Config.WarzoneServiceRecordJsonSchemaPath)) }); var query = new GetWarzoneServiceRecord() .ForPlayer(gamertag); var jArray = await Global.Session.Get<JObject>(query.GetConstructedUri()); SchemaUtility.AssertSchemaIsValid(weaponsSchema, jArray); }