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()
|
public async Task GetGeoPointAsync_WithValidAddress_ReturnsCoordinates()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var address = new Address(
|
var address = new Address
|
||||||
Line1: _testData.ValidAddress.Line1,
|
{
|
||||||
Line2: _testData.ValidAddress.Line2,
|
Line1 = _testData.ValidAddress.Line1,
|
||||||
City: _testData.ValidAddress.City,
|
Line2 = _testData.ValidAddress.Line2,
|
||||||
Subdivision: _testData.ValidAddress.Subdivision,
|
City = _testData.ValidAddress.City,
|
||||||
PostalCode: _testData.ValidAddress.PostalCode,
|
Subdivision = _testData.ValidAddress.Subdivision,
|
||||||
Country: _testData.ValidAddress.Country,
|
PostalCode = _testData.ValidAddress.PostalCode,
|
||||||
Location: null,
|
Country = _testData.ValidAddress.Country,
|
||||||
Note: null);
|
Location = null,
|
||||||
|
Note = null
|
||||||
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = await _provider.GetGeoPointAsync(address);
|
var result = await _provider.GetGeoPointAsync(address);
|
||||||
@ -89,7 +91,7 @@ public class GoogleProviderTests : IDisposable
|
|||||||
Assert.NotNull(result.Line1);
|
Assert.NotNull(result.Line1);
|
||||||
Assert.NotNull(result.City);
|
Assert.NotNull(result.City);
|
||||||
Assert.NotNull(result.Country);
|
Assert.NotNull(result.Country);
|
||||||
Assert.True(result.IsNormalized);
|
Assert.True(result.IsNormalized());
|
||||||
Assert.NotNull(result.Location);
|
Assert.NotNull(result.Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,22 +99,24 @@ public class GoogleProviderTests : IDisposable
|
|||||||
public async Task NormalizeAddressAsync_WithAddressObject_ReturnsNormalizedAddress()
|
public async Task NormalizeAddressAsync_WithAddressObject_ReturnsNormalizedAddress()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var address = new Address(
|
var address = new Address
|
||||||
Line1: _testData.NormalizeTestAddress.Line1,
|
{
|
||||||
Line2: _testData.NormalizeTestAddress.Line2,
|
Line1 = _testData.NormalizeTestAddress.Line1,
|
||||||
City: _testData.NormalizeTestAddress.City,
|
Line2 = _testData.NormalizeTestAddress.Line2,
|
||||||
Subdivision: _testData.NormalizeTestAddress.Subdivision,
|
City = _testData.NormalizeTestAddress.City,
|
||||||
PostalCode: _testData.NormalizeTestAddress.PostalCode,
|
Subdivision = _testData.NormalizeTestAddress.Subdivision,
|
||||||
Country: _testData.NormalizeTestAddress.Country,
|
PostalCode = _testData.NormalizeTestAddress.PostalCode,
|
||||||
Location: null,
|
Country = _testData.NormalizeTestAddress.Country,
|
||||||
Note: null);
|
Location = null,
|
||||||
|
Note = null
|
||||||
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = await _provider.NormalizeAddressAsync(address);
|
var result = await _provider.NormalizeAddressAsync(address);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.NotNull(result);
|
Assert.NotNull(result);
|
||||||
Assert.True(result.IsNormalized);
|
Assert.True(result.IsNormalized());
|
||||||
Assert.NotNull(result.Location);
|
Assert.NotNull(result.Location);
|
||||||
Assert.NotNull(result.Line1);
|
Assert.NotNull(result.Line1);
|
||||||
Assert.Contains("Amphitheatre", result.Line1, StringComparison.OrdinalIgnoreCase);
|
Assert.Contains("Amphitheatre", result.Line1, StringComparison.OrdinalIgnoreCase);
|
||||||
@ -129,7 +133,7 @@ public class GoogleProviderTests : IDisposable
|
|||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.NotNull(result);
|
Assert.NotNull(result);
|
||||||
Assert.True(result.IsNormalized);
|
Assert.True(result.IsNormalized());
|
||||||
Assert.NotNull(result.Location);
|
Assert.NotNull(result.Location);
|
||||||
Assert.NotNull(result.Line1);
|
Assert.NotNull(result.Line1);
|
||||||
Assert.Contains("Mountain View", result.City, StringComparison.OrdinalIgnoreCase);
|
Assert.Contains("Mountain View", result.City, StringComparison.OrdinalIgnoreCase);
|
||||||
@ -139,15 +143,17 @@ public class GoogleProviderTests : IDisposable
|
|||||||
public async Task GetGeoPointAsync_WithInvalidAddress_ReturnsNull()
|
public async Task GetGeoPointAsync_WithInvalidAddress_ReturnsNull()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var address = new Address(
|
var address = new Address
|
||||||
Line1: _testData.InvalidAddress.Line1,
|
{
|
||||||
Line2: _testData.InvalidAddress.Line2,
|
Line1 = _testData.InvalidAddress.Line1,
|
||||||
City: _testData.InvalidAddress.City,
|
Line2 = _testData.InvalidAddress.Line2,
|
||||||
Subdivision: _testData.InvalidAddress.Subdivision,
|
City = _testData.InvalidAddress.City,
|
||||||
PostalCode: _testData.InvalidAddress.PostalCode,
|
Subdivision = _testData.InvalidAddress.Subdivision,
|
||||||
Country: _testData.InvalidAddress.Country,
|
PostalCode = _testData.InvalidAddress.PostalCode,
|
||||||
Location: null,
|
Country = _testData.InvalidAddress.Country,
|
||||||
Note: null);
|
Location = null,
|
||||||
|
Note = null
|
||||||
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = await _provider.GetGeoPointAsync(address);
|
var result = await _provider.GetGeoPointAsync(address);
|
||||||
@ -172,7 +178,7 @@ public class GoogleProviderTests : IDisposable
|
|||||||
// This test just verifies it doesn't crash
|
// This test just verifies it doesn't crash
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
Assert.True(result.IsNormalized);
|
Assert.True(result.IsNormalized());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user