public async Task GetPointOfInterestDetailsTest() { var service = new AzureMapsGeoSpatialService(); await service.InitKeyAsync(MockData.Key, MockData.Radius, MockData.Limit, MockData.RouteLimit, MockData.Locale, mockClient); var pointOfInterestList = await service.GetNearbyPointOfInterestListAsync(MockData.Latitude, MockData.Longitude); var pointOfInterest = await service.GetPointOfInterestDetailsAsync(pointOfInterestList[0]); Assert.AreEqual(pointOfInterest.PointOfInterestImageUrl.Substring(0, 23), "data:image/jpeg;base64,"); }
public async Task GetPointOfInterestDetailsTest() { var service = new AzureMapsGeoSpatialService(); await service.InitKeyAsync(MockData.Key, MockData.Radius, MockData.Limit, MockData.Locale, mockClient); var pointOfInterestList = await service.GetNearbyPointOfInterestListAsync(MockData.Latitude, MockData.Longitude); var pointOfInterest = await service.GetPointOfInterestDetailsAsync(pointOfInterestList[0]); Assert.AreEqual(pointOfInterest.PointOfInterestImageUrl, string.Format("https://atlas.microsoft.com/map/static/png?api-version=1.0&layer=basic&style=main&zoom={2}¢er={1},{0}&width=440&height=240&subscription-key={3}", pointOfInterestList[0].Geolocation.Latitude, pointOfInterestList[0].Geolocation.Longitude, 14, MockData.Key)); }