diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-11-27 01:59:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-27 01:59:58 -0500 |
| commit | 9169a28df195b999c3813f842780dd7763bbcc9f (patch) | |
| tree | b64a9107b52c1bb3017be11da760f36d3aca113b /tests | |
| parent | 536ac4c11cfff5349b973892f206fe5cfb0ae6f0 (diff) | |
| parent | 38932fc7d1c6851b6a282e9723bea471ef494b96 (diff) | |
Merge pull request #4588 from jellyfin/hex
Remove Hex class as the BCL has one now
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Common.Tests/HexTests.cs | 19 | ||||
| -rw-r--r-- | tests/Jellyfin.Common.Tests/PasswordHashTests.cs | 5 |
2 files changed, 3 insertions, 21 deletions
diff --git a/tests/Jellyfin.Common.Tests/HexTests.cs b/tests/Jellyfin.Common.Tests/HexTests.cs deleted file mode 100644 index 5b578d38cb..0000000000 --- a/tests/Jellyfin.Common.Tests/HexTests.cs +++ /dev/null @@ -1,19 +0,0 @@ -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))); - } - } -} diff --git a/tests/Jellyfin.Common.Tests/PasswordHashTests.cs b/tests/Jellyfin.Common.Tests/PasswordHashTests.cs index 46926f4f81..c4422bd105 100644 --- a/tests/Jellyfin.Common.Tests/PasswordHashTests.cs +++ b/tests/Jellyfin.Common.Tests/PasswordHashTests.cs @@ -1,3 +1,4 @@ +using System; using MediaBrowser.Common; using MediaBrowser.Common.Cryptography; using Xunit; @@ -16,8 +17,8 @@ namespace Jellyfin.Common.Tests { var pass = PasswordHash.Parse(passwordHash); Assert.Equal(id, pass.Id); - Assert.Equal(salt, Hex.Encode(pass.Salt, false)); - Assert.Equal(hash, Hex.Encode(pass.Hash, false)); + Assert.Equal(salt, Convert.ToHexString(pass.Salt)); + Assert.Equal(hash, Convert.ToHexString(pass.Hash)); } [Theory] |
