add gps matcher service

This commit is contained in:
Alex Bezdieniezhnykh
2025-04-14 09:50:34 +03:00
parent 36b3bf1712
commit ca1682a86e
26 changed files with 759 additions and 119 deletions
+1
View File
@@ -15,6 +15,7 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.8.0" />
</ItemGroup>
+32
View File
@@ -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);
}
}