postit: tolerate nearby rdv map cache hits

This commit is contained in:
Paul Schneider 2026-09-06 17:25:10 +01:00
commit 52be2e6066
2 changed files with 44 additions and 2 deletions

View file

@ -0,0 +1,30 @@
using PostIt.Views.Commands;
namespace PostIt.Tests;
public class RdvPageTests
{
[Fact]
public void AreCoordinatesClose_returns_true_for_nearby_points_within_cache_tolerance()
{
var result = RdvPage.AreCoordinatesClose(
48.8566,
2.3522,
48.85665,
2.35225);
Assert.True(result);
}
[Fact]
public void AreCoordinatesClose_returns_false_for_points_outside_cache_tolerance()
{
var result = RdvPage.AreCoordinatesClose(
48.8566,
2.3522,
48.85685,
2.3522);
Assert.False(result);
}
}