From 5fa456e48040f86b1b543689a6903bf0b6fc6ac9 Mon Sep 17 00:00:00 2001 From: Tom Ashworth Date: Wed, 23 Oct 2024 22:20:59 +0100 Subject: [PATCH] fix: build warnings (null) --- src/NameBadgeAutomater/Services/NameParserService.cs | 2 +- .../NameBadgeAutomater.Tests/Services/NameParserServiceTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NameBadgeAutomater/Services/NameParserService.cs b/src/NameBadgeAutomater/Services/NameParserService.cs index 70979e8..131c33b 100644 --- a/src/NameBadgeAutomater/Services/NameParserService.cs +++ b/src/NameBadgeAutomater/Services/NameParserService.cs @@ -24,7 +24,7 @@ public List ParseRawNames(string rawNames) .ToList(); } - public Person? ParseRawName(string rawName) + public Person? ParseRawName(string? rawName) { if (string.IsNullOrWhiteSpace(rawName)) return null; // No name. diff --git a/tests/NameBadgeAutomater.Tests/Services/NameParserServiceTests.cs b/tests/NameBadgeAutomater.Tests/Services/NameParserServiceTests.cs index 6cf073e..8e83b08 100644 --- a/tests/NameBadgeAutomater.Tests/Services/NameParserServiceTests.cs +++ b/tests/NameBadgeAutomater.Tests/Services/NameParserServiceTests.cs @@ -34,7 +34,7 @@ public void ParseRawName_ShouldReturnCorrectNames(string rawName, string firstNa [InlineData(null)] [InlineData("")] [InlineData(" ")] - public void ParseRawName_ShouldReturnNull_WhenEmptyValue(string rawName) + public void ParseRawName_ShouldReturnNull_WhenEmptyValue(string? rawName) { //Arrange var sut = new NameParserService();