Skip to content

Commit

Permalink
add MD5 test with length.
Browse files Browse the repository at this point in the history
  • Loading branch information
catcherwong authored Sep 29, 2017
1 parent 1eabf1c commit 18c44c2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/NETCore.Encrypt.Tests/MD5_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,16 @@ public void MD5_Error_Test()
{
Assert.Throws<ArgumentException>(() => EncryptProvider.Md5(string.Empty));
}

[Fact(DisplayName = "MD5 with length success test")]
public void MD5_With_Length_Success_Test()
{
var srcString = "Md5 test";

var hashed = EncryptProvider.Md5(srcString, MD5Length.L16);

Assert.NotEmpty(hashed);
Assert.Equal("69c6ecadb32f5492", hashed.ToLower());
}
}
}

0 comments on commit 18c44c2

Please sign in to comment.