Exemple #1
0
        public void returns_default_provider_when_issuer_provider_not_specified()
        {
            var defaultAlgorithm = new Mock<ISignatureAlgorithm>();
            var signatureProvider = new SignatureProvider(defaultAlgorithm.Object);

            IssuerInformation provider = signatureProvider.GetIssuer("someone");

            Assert.AreSame(defaultAlgorithm.Object, provider.IssuerAlgorithm, "When no vendor algorithm provided, default should be returned");
        }
Exemple #2
0
 public void when_signature_provider_initialized_with_accept_signature_it_always_allows()
 {
     var signatureProvider = new SignatureProvider(new AcceptSignatureAlgorithm());
     var algorithm = signatureProvider.GetIssuer("Whatever");
     Assert.IsTrue(algorithm.IssuerAlgorithm.Verify(null, null), "When SignatureProvider was initialized with AcceptSignatureAlgorithm it should accept signatures, which are not denied by other policies");
 }