Skip to content

Commit 006525f

Browse files
author
Igor Evdokimov
committed
- bugfix for Talks
1 parent af7ff66 commit 006525f

File tree

2 files changed

+29
-31
lines changed

2 files changed

+29
-31
lines changed

Botticelli.Locations.Tests/ReverseGeocoderMock.cs

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,30 @@ namespace Botticelli.Locations.Tests;
66

77
public class ReverseGeocoderMock : IReverseGeocoder
88
{
9-
public async Task<GeocodeResponse> ReverseGeocode(ReverseGeocodeRequest req)
9+
public Task<GeocodeResponse> ReverseGeocode(ReverseGeocodeRequest req)
1010
{
11-
return new GeocodeResponse
12-
{
13-
Latitude = req.Latitude.Value,
14-
Longitude = req.Longitude.Value,
15-
DisplayName = "TESTGEO",
16-
Address = new AddressResult
11+
if (req is { Latitude: not null, Longitude: not null })
12+
return Task.FromResult<GeocodeResponse>(new()
1713
{
18-
Country = "TestCountry",
19-
CountryCode = "TC0202",
20-
County = "TestCounty",
21-
HouseNumber = "999",
22-
PostCode = "10291",
23-
Road = "Abbey",
24-
State = "NowhereState",
25-
Town = "Nowhereville",
26-
Pedestrian = "Sidewalk",
27-
District = "NoDistrict",
28-
Name = string.Empty
29-
}
30-
};
14+
Latitude = req.Latitude.Value,
15+
Longitude = req.Longitude.Value,
16+
DisplayName = "TESTGEO",
17+
Address = new AddressResult
18+
{
19+
Country = "TestCountry",
20+
CountryCode = "TC0202",
21+
County = "TestCounty",
22+
HouseNumber = "999",
23+
PostCode = "10291",
24+
Road = "Abbey",
25+
State = "NowhereState",
26+
Town = "NowhereVille",
27+
Pedestrian = "Sidewalk",
28+
District = "NoDistrict",
29+
Name = string.Empty
30+
}
31+
});
32+
33+
throw new System.InvalidOperationException();
3134
}
3235
}

Botticelli.Talks/Botticelli.Talks.csproj

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1717
</PropertyGroup>
1818

19-
<ItemGroup>
20-
<None Include="..\new_logo_compact.png">
21-
<Pack>True</Pack>
22-
<Link>new_logo_compact.png</Link>
23-
</None>
24-
</ItemGroup>
25-
26-
<ItemGroup>
27-
<Folder Include="GoogleTts\"/>
28-
</ItemGroup>
29-
3019
<ItemGroup>
3120
<PackageReference Include="Flurl.Http" Version="4.0.2"/>
3221
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
@@ -42,4 +31,10 @@
4231
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
4332
</ItemGroup>
4433

34+
<ItemGroup>
35+
<Content Include="..\new_logo_compact.png">
36+
<Link>new_logo_compact.png</Link>
37+
</Content>
38+
</ItemGroup>
39+
4540
</Project>

0 commit comments

Comments
 (0)