Example #1
0
        public void Verify(SignatureTheoryData theoryData)
        {
            var context = TestUtilities.WriteHeader($"{this}.Verify", theoryData);

            try
            {
                theoryData.Signature.Verify(theoryData.SecurityKey, theoryData.CryptoProviderFactory);
            }
            catch (Exception ex)
            {
                theoryData.ExpectedException.ProcessException(ex, context);
            }

            TestUtilities.AssertFailIfErrors(context);
        }
Example #2
0
        public void Constructor(SignatureTheoryData theoryData)
        {
            TestUtilities.WriteHeader($"{this}.Constructor", theoryData);
            var context = new CompareContext($"{this}.Constructor, {theoryData.TestId}");

            try
            {
                var signature = new Signature(theoryData.SignedInfo);
                theoryData.ExpectedException.ProcessNoException(context);
            }
            catch (Exception ex)
            {
                theoryData.ExpectedException.ProcessException(ex, context);
            }

            TestUtilities.AssertFailIfErrors(context);
        }