mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:46:30 +00:00
add gps matcher service
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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