aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-03-12 00:15:12 +0100
committerGitHub <noreply@github.com>2021-03-12 00:15:12 +0100
commitd7f0aaaec10aa642d1d73c87771c6089c19d0ab6 (patch)
tree3e103444c61808a86d5b60604648e5eb5a074352 /tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs
parente3adc9ab74abaaa00a40bba7614e8e42d63119ee (diff)
parent5241bd41ef4917e0a3071f961f08dd2eeec5a5dd (diff)
Merge pull request #5417 from Bond-009/codeanal
Add code analysis attributes where appropriate
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs')
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs
index a6fe90566..e5508243f 100644
--- a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs
+++ b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs
@@ -40,12 +40,16 @@ namespace Jellyfin.Server.Implementations.Tests.Library
}
[Theory]
+ [InlineData(null, null, null)]
+ [InlineData(null, "/my/path", "/another/path")]
+ [InlineData("/my/path", null, "/another/path")]
+ [InlineData("/my/path", "/another/path", null)]
[InlineData("", "", "")]
[InlineData("/my/path", "", "")]
[InlineData("", "/another/path", "")]
[InlineData("", "", "/new/subpath")]
[InlineData("/home/jeff/music/jeff's band/consistently inconsistent.mp3", "/home/jeff/music/not jeff's band", "/home/not jeff")]
- public void TryReplaceSubPath_InvalidInput_ReturnsFalseAndNull(string path, string subPath, string newSubPath)
+ public void TryReplaceSubPath_InvalidInput_ReturnsFalseAndNull(string? path, string? subPath, string? newSubPath)
{
Assert.False(PathExtensions.TryReplaceSubPath(path, subPath, newSubPath, out var result));
Assert.Null(result);