mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 14:46:31 +00:00
add gps matcher service
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Azaion.Common.DTO.Config;
|
||||
using Azaion.Common.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Azaion.Annotator.Test;
|
||||
|
||||
public class GetTilesTestClass
|
||||
{
|
||||
[Fact]
|
||||
public async Task GetTilesTest()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddHttpClient();
|
||||
var provider = services.BuildServiceProvider();
|
||||
var httpClientFactory = provider.GetService<IHttpClientFactory>()!;
|
||||
|
||||
var satelliteDownloader = new SatelliteDownloader(Mock.Of<ILogger<SatelliteDownloader>>(), new OptionsWrapper<MapConfig>(new MapConfig
|
||||
{
|
||||
Service = "GoogleMaps",
|
||||
ApiKey = "AIzaSyAXRBDBOskC5QOHG6VJWzmVJwYKcu6WH8k"
|
||||
}), new OptionsWrapper<DirectoriesConfig>(new DirectoriesConfig
|
||||
{
|
||||
GpsSatDirectory = "satelliteMaps"
|
||||
}), httpClientFactory);
|
||||
|
||||
await satelliteDownloader.GetTiles(48.2748909, 37.3834877, 600, 18);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user