aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Common.Tests/HexTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.Common.Tests/HexTests.cs')
-rw-r--r--tests/Jellyfin.Common.Tests/HexTests.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/Jellyfin.Common.Tests/HexTests.cs b/tests/Jellyfin.Common.Tests/HexTests.cs
new file mode 100644
index 000000000..5b578d38c
--- /dev/null
+++ b/tests/Jellyfin.Common.Tests/HexTests.cs
@@ -0,0 +1,19 @@
+using MediaBrowser.Common;
+using Xunit;
+
+namespace Jellyfin.Common.Tests
+{
+ public class HexTests
+ {
+ [Theory]
+ [InlineData("")]
+ [InlineData("00")]
+ [InlineData("01")]
+ [InlineData("000102030405060708090a0b0c0d0e0f")]
+ [InlineData("0123456789abcdef")]
+ public void RoundTripTest(string data)
+ {
+ Assert.Equal(data, Hex.Encode(Hex.Decode(data)));
+ }
+ }
+}