diff --git a/src/Infrastructure.Tests/GenericTests.cs b/src/Infrastructure.Tests/GenericTests.cs index b8408ab..909d709 100644 --- a/src/Infrastructure.Tests/GenericTests.cs +++ b/src/Infrastructure.Tests/GenericTests.cs @@ -1,3 +1,6 @@ +using System.Security.Cryptography; +using Newtonsoft.Json; + namespace Infrastructure.Tests; public class GenericTests @@ -23,4 +26,14 @@ public class GenericTests Assert.Equal(default, value); Assert.Null(nullableValue); } + + [Fact] + public void HashTest() + { + var json = JsonConvert.SerializeObject(323234L); + var hashBytes = MD5.HashData(Encoding.ASCII.GetBytes(json)); + var hashString = BitConverter.ToString(hashBytes).Replace("-", "").ToLowerInvariant(); + Assert.NotEmpty(hashString); + Assert.NotNull(hashString); + } } \ No newline at end of file