aboutsummaryrefslogtreecommitdiffstats
path: root/tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-06-01 18:33:17 -0500
committerJP Dillingham <jp@dillingham.me>2026-06-01 18:33:17 -0500
commit7239327610f020dcb9028a845709c79a5567869d (patch)
treee7b87b066e68f6959fac08025a3ff25e14305162 /tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs
parent18ecfac2d8dc2b5c768cc7cc2dc61fa23259417c (diff)
downloadslskd-7239327610f020dcb9028a845709c79a5567869d.tar.gz
gracefully handle nulls
Diffstat (limited to 'tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs')
-rw-r--r--tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs b/tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs
index 160f2a72..0b3eb81e 100644
--- a/tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs
+++ b/tests/slskd.Tests.Unit/Common/FileSafety/LocalizePathTests.cs
@@ -54,5 +54,13 @@ public partial class FileSafetyTests
Assert.False(string.IsNullOrEmpty(result));
}
+
+ [Fact]
+ public void Returns_Null_Given_Null_Path()
+ {
+ var result = FileSafety.LocalizePath(null);
+
+ Assert.Null(result);
+ }
}
}