diff --git a/SongTidy.Tests/FilenameParserTests.cs b/SongTidy.Tests/FilenameParserTests.cs index b264033..637cc93 100644 --- a/SongTidy.Tests/FilenameParserTests.cs +++ b/SongTidy.Tests/FilenameParserTests.cs @@ -231,18 +231,6 @@ public sealed class FilenameParserTests { #endregion - #region Argument validation - - /// - /// Verifies that a null input is rejected. - /// - [TestMethod] - public void ThrowsForNullInput() { - Assert.Throws(() => FilenameParser.Parse(null!)); - } - - #endregion - /// /// Parses the input and asserts all three resulting fields. /// diff --git a/SongTidy.Tests/RenameFormatsTests.cs b/SongTidy.Tests/RenameFormatsTests.cs index 929d496..a26994c 100644 --- a/SongTidy.Tests/RenameFormatsTests.cs +++ b/SongTidy.Tests/RenameFormatsTests.cs @@ -114,15 +114,6 @@ public sealed class RenameFormatsTests { AssertStem(RenameFormat.ArtistFirst, " ", "Title", "\t", "Title"); } - /// - /// Verifies that a null title is rejected. - /// - [TestMethod] - public void ThrowsForNullTitle() { - Assert.Throws( - () => RenameFormats.GenerateStem(RenameFormat.ArtistFirst, "Artist", null!, "Live")); - } - #endregion /// diff --git a/SongTidy/Models/RenameFormats.cs b/SongTidy/Models/RenameFormats.cs index a53620a..fca016f 100644 --- a/SongTidy/Models/RenameFormats.cs +++ b/SongTidy/Models/RenameFormats.cs @@ -109,10 +109,6 @@ public static class RenameFormats { /// Whitespace-only optional fields are treated as missing. /// public static string GenerateStem(RenameFormat format, string artist, string title, string comment) { - ArgumentNullException.ThrowIfNull(artist); - ArgumentNullException.ThrowIfNull(title); - ArgumentNullException.ThrowIfNull(comment); - RenameFormatDefinition definition = GetDefinition(format); bool hasArtist = !string.IsNullOrWhiteSpace(artist); bool hasComment = !string.IsNullOrWhiteSpace(comment); diff --git a/SongTidy/Services/FilenameParser.cs b/SongTidy/Services/FilenameParser.cs index 36a1869..308079b 100644 --- a/SongTidy/Services/FilenameParser.cs +++ b/SongTidy/Services/FilenameParser.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Text; @@ -22,8 +21,6 @@ public static class FilenameParser { /// When no hyphen or more than one hyphen remains, the artist is empty and the whole text is the title. /// public static FilenameParseResult Parse(string fileNameWithoutExtension) { - ArgumentNullException.ThrowIfNull(fileNameWithoutExtension); - string source = fileNameWithoutExtension; string comment = string.Empty;