Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
danjov committed Oct 3, 2023
1 parent 504e481 commit b6f1763
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ jobs:
run: npm ci

- run: dotnet build EWS.sln /warnaserror
- run: dotnet test EWS.sln --no-build --verbosity normal

- name: Setup upterm session
uses: lhotari/action-upterm@v1
- run: dotnet test EWS.sln --no-build --verbosity detailed
- working-directory: ./src/ClientApp
run: npm run build --if-present
- working-directory: ./src/ClientApp
Expand Down
5 changes: 5 additions & 0 deletions src/DataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public async Task<DataServiceResponse> GetAsync(List<Point> points)
{
var boundingBox = FormattableString.Invariant($"{point.X},{point.Y},{point.X},{point.Y}");

Console.WriteLine("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
Console.WriteLine(boundingBox);
Console.WriteLine($"{GemeindeLayer}/?bbox={boundingBox}", "gemeindename");

var gemeinde = await GetDataServiceApiResponse($"{GemeindeLayer}/?bbox={boundingBox}", "gemeindename").ConfigureAwait(false);
if (!gemeinden.Contains(gemeinde))
gemeinden.Add(gemeinde);
Expand All @@ -60,6 +64,7 @@ public async Task<DataServiceResponse> GetAsync(List<Point> points)
{
try
{
await Console.Out.WriteLineAsync(new Uri(requestUrl, UriKind.Relative).ToString()).ConfigureAwait(false);
using var response = await client.GetAsync(new Uri(requestUrl, UriKind.Relative)).ConfigureAwait(false);
response.EnsureSuccessStatusCode();

Expand Down
2 changes: 1 addition & 1 deletion tests/DataServiceControllerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public async Task GetAsyncForSinglePoint()
[TestMethod]
public async Task GetAsyncForMultiplePoints()
{
var points = new List<Point> { new(2605532, 1229554), new(2605590, 1229590) };
var points = new List<Point> { new(2605531, 1229553), new(2605591, 1229592) };
var result = await dataService.GetAsync(points);

Assert.AreEqual("Langendorf", result.Gemeinde);
Expand Down

0 comments on commit b6f1763

Please sign in to comment.