public void GetConstructedUri_NoParamaters_MatchesExpected() { var query = new GetMaps(); var uri = query.GetConstructedUri(); Assert.AreEqual("metadata/h5/metadata/maps", uri); }
public void GetConstructedUri_NoParamaters_MatchesExpected() { var query = new GetMaps(); var uri = query.GetConstructedUri(); Assert.AreEqual(BaseUri, uri); }
public async Task GetMaps_DoesNotThrow() { var query = new GetMaps() .SkipCache(); var result = await Global.Session.Query(query); Assert.IsInstanceOf(typeof(List<Map>), result); }
public async Task GetMaps_DoesNotThrow() { var query = new GetMaps() .SkipCache(); var result = await Global.Session.Query(query); Assert.IsInstanceOf(typeof(List <Map>), result); }
public async Task GetMaps_IsSerializable() { var query = new GetMaps() .SkipCache(); var result = await Global.Session.Query(query); SerializationUtility <List <Map> > .AssertRoundTripSerializationIsPossible(result); }
public async Task Query_DoesNotThrow() { var query = new GetMaps() .SkipCache(); var result = await _mockSession.Query(query); Assert.IsInstanceOf(typeof(List<Map>), result); Assert.AreEqual(_maps, result); }
public async Task Query_DoesNotThrow() { var query = new GetMaps() .SkipCache(); var result = await _mockSession.Query(query); Assert.IsInstanceOf(typeof(List <Map>), result); Assert.AreEqual(_maps, result); }
public async Task GetMaps_IsSerializable() { var query = new GetMaps() .SkipCache(); var result = await Global.Session.Query(query); var serializationUtility = new SerializationUtility<List<Map>>(); serializationUtility.AssertRoundTripSerializationIsPossible(result); }
public async Task GetMaps_SchemaIsValid() { var mapsSchema = JSchema.Parse(File.ReadAllText(Config.MapJsonSchemaPath), new JSchemaReaderSettings { Resolver = new JSchemaUrlResolver(), BaseUri = new Uri(Path.GetFullPath(Config.MapJsonSchemaPath)) }); var query = new GetMaps() .SkipCache(); var jArray = await Global.Session.Get<JArray>(query.GetConstructedUri()); SchemaUtility.AssertSchemaIsValid(mapsSchema, jArray); }
public async Task GetMaps_SchemaIsValid() { var mapsSchema = JSchema.Parse(File.ReadAllText(Config.MapJsonSchemaPath), new JSchemaReaderSettings { Resolver = new JSchemaUrlResolver(), BaseUri = new Uri(Path.GetFullPath(Config.MapJsonSchemaPath)) }); var query = new GetMaps() .SkipCache(); var jArray = await Global.Session.Get <JArray>(query.GetConstructedUri()); SchemaUtility.AssertSchemaIsValid(mapsSchema, jArray); }
public async Task GetMaps_ModelMatchesSchema() { var schema = JSchema.Parse(File.ReadAllText(Config.MapJsonSchemaPath), new JSchemaReaderSettings { Resolver = new JSchemaUrlResolver(), BaseUri = new Uri(Path.GetFullPath(Config.MapJsonSchemaPath)) }); var query = new GetMaps() .SkipCache(); var result = await Global.Session.Query(query); var json = JsonConvert.SerializeObject(result); var jContainer = JsonConvert.DeserializeObject <JContainer>(json); SchemaUtility.AssertSchemaIsValid(schema, jContainer); }
public async Task GetMaps_ModelMatchesSchema() { var schema = JSchema.Parse(File.ReadAllText(Config.MapJsonSchemaPath), new JSchemaReaderSettings { Resolver = new JSchemaUrlResolver(), BaseUri = new Uri(Path.GetFullPath(Config.MapJsonSchemaPath)) }); var query = new GetMaps() .SkipCache(); var result = await Global.Session.Query(query); var json = JsonConvert.SerializeObject(result); var jContainer = JsonConvert.DeserializeObject<JContainer>(json); SchemaUtility.AssertSchemaIsValid(schema, jContainer); }
public void Uri_MatchesExpected() { var query = new GetMaps(); Assert.AreEqual("https://www.haloapi.com/metadata/h5/metadata/maps", query.Uri); }