fix tests with claude
All checks were successful
Publish NuGet Packages / build-and-publish (push) Successful in 27s
All checks were successful
Publish NuGet Packages / build-and-publish (push) Successful in 27s
This commit is contained in:
parent
1c1b2877cf
commit
075a803f4f
@ -54,15 +54,17 @@ public class GoogleProviderTests : IDisposable
|
||||
public async Task GetGeoPointAsync_WithValidAddress_ReturnsCoordinates()
|
||||
{
|
||||
// Arrange
|
||||
var address = new Address(
|
||||
Line1: _testData.ValidAddress.Line1,
|
||||
Line2: _testData.ValidAddress.Line2,
|
||||
City: _testData.ValidAddress.City,
|
||||
Subdivision: _testData.ValidAddress.Subdivision,
|
||||
PostalCode: _testData.ValidAddress.PostalCode,
|
||||
Country: _testData.ValidAddress.Country,
|
||||
Location: null,
|
||||
Note: null);
|
||||
var address = new Address
|
||||
{
|
||||
Line1 = _testData.ValidAddress.Line1,
|
||||
Line2 = _testData.ValidAddress.Line2,
|
||||
City = _testData.ValidAddress.City,
|
||||
Subdivision = _testData.ValidAddress.Subdivision,
|
||||
PostalCode = _testData.ValidAddress.PostalCode,
|
||||
Country = _testData.ValidAddress.Country,
|
||||
Location = null,
|
||||
Note = null
|
||||
};
|
||||
|
||||
// Act
|
||||
var result = await _provider.GetGeoPointAsync(address);
|
||||
@ -89,7 +91,7 @@ public class GoogleProviderTests : IDisposable
|
||||
Assert.NotNull(result.Line1);
|
||||
Assert.NotNull(result.City);
|
||||
Assert.NotNull(result.Country);
|
||||
Assert.True(result.IsNormalized);
|
||||
Assert.True(result.IsNormalized());
|
||||
Assert.NotNull(result.Location);
|
||||
}
|
||||
|
||||
@ -97,22 +99,24 @@ public class GoogleProviderTests : IDisposable
|
||||
public async Task NormalizeAddressAsync_WithAddressObject_ReturnsNormalizedAddress()
|
||||
{
|
||||
// Arrange
|
||||
var address = new Address(
|
||||
Line1: _testData.NormalizeTestAddress.Line1,
|
||||
Line2: _testData.NormalizeTestAddress.Line2,
|
||||
City: _testData.NormalizeTestAddress.City,
|
||||
Subdivision: _testData.NormalizeTestAddress.Subdivision,
|
||||
PostalCode: _testData.NormalizeTestAddress.PostalCode,
|
||||
Country: _testData.NormalizeTestAddress.Country,
|
||||
Location: null,
|
||||
Note: null);
|
||||
var address = new Address
|
||||
{
|
||||
Line1 = _testData.NormalizeTestAddress.Line1,
|
||||
Line2 = _testData.NormalizeTestAddress.Line2,
|
||||
City = _testData.NormalizeTestAddress.City,
|
||||
Subdivision = _testData.NormalizeTestAddress.Subdivision,
|
||||
PostalCode = _testData.NormalizeTestAddress.PostalCode,
|
||||
Country = _testData.NormalizeTestAddress.Country,
|
||||
Location = null,
|
||||
Note = null
|
||||
};
|
||||
|
||||
// Act
|
||||
var result = await _provider.NormalizeAddressAsync(address);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(result);
|
||||
Assert.True(result.IsNormalized);
|
||||
Assert.True(result.IsNormalized());
|
||||
Assert.NotNull(result.Location);
|
||||
Assert.NotNull(result.Line1);
|
||||
Assert.Contains("Amphitheatre", result.Line1, StringComparison.OrdinalIgnoreCase);
|
||||
@ -129,7 +133,7 @@ public class GoogleProviderTests : IDisposable
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(result);
|
||||
Assert.True(result.IsNormalized);
|
||||
Assert.True(result.IsNormalized());
|
||||
Assert.NotNull(result.Location);
|
||||
Assert.NotNull(result.Line1);
|
||||
Assert.Contains("Mountain View", result.City, StringComparison.OrdinalIgnoreCase);
|
||||
@ -139,15 +143,17 @@ public class GoogleProviderTests : IDisposable
|
||||
public async Task GetGeoPointAsync_WithInvalidAddress_ReturnsNull()
|
||||
{
|
||||
// Arrange
|
||||
var address = new Address(
|
||||
Line1: _testData.InvalidAddress.Line1,
|
||||
Line2: _testData.InvalidAddress.Line2,
|
||||
City: _testData.InvalidAddress.City,
|
||||
Subdivision: _testData.InvalidAddress.Subdivision,
|
||||
PostalCode: _testData.InvalidAddress.PostalCode,
|
||||
Country: _testData.InvalidAddress.Country,
|
||||
Location: null,
|
||||
Note: null);
|
||||
var address = new Address
|
||||
{
|
||||
Line1 = _testData.InvalidAddress.Line1,
|
||||
Line2 = _testData.InvalidAddress.Line2,
|
||||
City = _testData.InvalidAddress.City,
|
||||
Subdivision = _testData.InvalidAddress.Subdivision,
|
||||
PostalCode = _testData.InvalidAddress.PostalCode,
|
||||
Country = _testData.InvalidAddress.Country,
|
||||
Location = null,
|
||||
Note = null
|
||||
};
|
||||
|
||||
// Act
|
||||
var result = await _provider.GetGeoPointAsync(address);
|
||||
@ -172,7 +178,7 @@ public class GoogleProviderTests : IDisposable
|
||||
// This test just verifies it doesn't crash
|
||||
if (result != null)
|
||||
{
|
||||
Assert.True(result.IsNormalized);
|
||||
Assert.True(result.IsNormalized());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user