mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-29 13:26:44 +01:00
Merge pull request #5417 from Bond-009/codeanal
Add code analysis attributes where appropriate
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user