postit: tolerate nearby rdv map cache hits
This commit is contained in:
parent
bc162b8a05
commit
247c100344
2 changed files with 44 additions and 2 deletions
30
src/PostIt/PostIt.Tests/RdvPageTests.cs
Normal file
30
src/PostIt/PostIt.Tests/RdvPageTests.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue