diff --git a/Directory.Packages.props b/Directory.Packages.props index f7c2172..18f6424 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,39 +3,44 @@ true true + + + + - - - - + + + + - + - - - - - + + + + + - - - + + + @@ -52,21 +57,21 @@ - + - + - + - + - + diff --git a/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs b/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs index 4b68df4..d844a42 100644 --- a/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs +++ b/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs @@ -128,8 +128,8 @@ private static (string? DaftUrl, string? DaftId) ExtractListingUrlAndId(HtmlDocu { var candidates = new[] { - a.GetAttributeValue("originalsrc", null), - a.GetAttributeValue("href", null), + a.GetAttributeValue("originalsrc", ""), + a.GetAttributeValue("href", ""), }; foreach (var raw in candidates) @@ -268,7 +268,7 @@ private static int ExtractFirstInt(string text, Regex regex) { foreach (var img in doc.DocumentNode.SelectNodes("//img") ?? Enumerable.Empty()) { - var src = img.GetAttributeValue("src", null); + var src = img.GetAttributeValue("src", ""); if (string.IsNullOrWhiteSpace(src)) continue; var m = BerRegex().Match(src); @@ -285,7 +285,7 @@ private static int ExtractFirstInt(string text, Regex regex) { foreach (var img in doc.DocumentNode.SelectNodes("//img") ?? Enumerable.Empty()) { - var src = img.GetAttributeValue("src", null); + var src = img.GetAttributeValue("src", ""); if (string.IsNullOrWhiteSpace(src)) continue; if (src.Contains("media.daft.ie", StringComparison.OrdinalIgnoreCase)) diff --git a/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs b/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs index 9c73431..47d52c2 100644 --- a/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs +++ b/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs @@ -212,8 +212,26 @@ public async Task Bulk_recycle_updates_count() using var db = _factory.CreateDbContext(); var toRecycle = new[] { - NewProperty("bulk-1", "D09", PropertyStatus.Inbox, 1000, 1, null, "Apartment", DateTime.UtcNow.AddDays(-10)), - NewProperty("bulk-2", "D09", PropertyStatus.Inbox, 1000, 1, null, "Apartment", DateTime.UtcNow.AddDays(-11)), + NewProperty( + "bulk-1", + "D09", + PropertyStatus.Inbox, + 1000, + 1, + null, + "Apartment", + DateTime.UtcNow.AddDays(-10) + ), + NewProperty( + "bulk-2", + "D09", + PropertyStatus.Inbox, + 1000, + 1, + null, + "Apartment", + DateTime.UtcNow.AddDays(-11) + ), }; db.Properties.AddRange(toRecycle); db.SaveChanges();