示例#1
0
        public void MessageValidator_ValidSignature_Should_Return_True_When_Has_Valid_Signature()
        {
            EncryptedMessage msg = MessageHelper.GetTestEncryptedMessage();

            var md     = new MessageSignatureValidator();
            var result = md.Validate(msg);

            Assert.True(result == true);
        }
示例#2
0
        public void MessageValidator_ValidSignature_Should_Return_False_When_Content_Is_Invalid()
        {
            EncryptedMessage msg = MessageHelper.GetTestEncryptedMessage();

            msg.Content = MessageHelper.GetInvalidData();

            var md     = new MessageSignatureValidator();
            var result = md.Validate(msg);

            Assert.True(result == false);
        }