Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/AddressData.Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
public static class Constants
{
// Overpass Turbo Queries
public const string OverpassTurboUrl = "https://maps.mail.ru/osm/tools/overpass/api/interpreter";
/// <summary>
/// Retrieved from https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances
/// </summary>
public const string OverpassTurboUrl = "https://overpass-api.de/api/interpreter";

Check warning on line 9 in src/AddressData.Core/Constants.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor your code not to use hardcoded absolute paths or URIs.

See more on https://sonarcloud.io/project/issues?id=ashtonav_addressdata&issues=AZ3L3qedhSlndr8jmKHM&open=AZ3L3qedhSlndr8jmKHM&pullRequest=6
public const string OverpassTurboGetAllCitiesQuery =
"?data=[out:csv(::id,\"name\",\"name:en\";true;\",\")];area[place=\"city\"];out;";
public static string OverpassTurboGetCityQuery(long areaId) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public async Task InsertAsyncAllowsCustomIEnumerableTypes()
var doc = await _documentService.InsertAsync(arrayWriteModel, location);

Assert.That(doc, Is.Not.Null);
Assert.That(doc!.Size, Is.EqualTo(2));
Assert.That(doc.Size, Is.EqualTo(2));

var fileName = Path.Combine("output", location.Country, location.State, $"{location.City}.csv");
var lines = await File.ReadAllLinesAsync(fileName);
Expand Down
4 changes: 2 additions & 2 deletions tests/AddressData.UnitTests/Services/SeedingServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public async Task AddCityReturnsDocumentFromDocumentServiceWhenAllValid()

// Assert
Assert.That(result, Is.Not.Null);
Assert.That(result!.Size, Is.EqualTo(999));
Assert.That(result.Size, Is.EqualTo(999));

_overpassTurboServiceMock.VerifyAll();
_documentServiceMock.VerifyAll();
Expand Down Expand Up @@ -469,7 +469,7 @@ public async Task AddCityCalledTwiceForSameAreaIdProducesSameResultIfDocumentSer

using (Assert.EnterMultipleScope())
{
Assert.That(first!.Size, Is.EqualTo(second!.Size));
Assert.That(first.Size, Is.EqualTo(second.Size));
Assert.That(first.City, Is.EqualTo(second.City));
}

Expand Down
Loading