Ejemplo n.º 1
0
        public void X509Data_EqualsTests(X509DataComparisonTheoryData theoryData)
        {
            var context = TestUtilities.WriteHeader($"{this}.{nameof(X509Data_EqualsTests)}", theoryData);

            try
            {
                Assert.Equal(theoryData.ShouldBeConsideredEqual, theoryData.FirstX509Data.Equals(theoryData.SecondX509Data));
            }
            catch (Exception ex)
            {
                theoryData.ExpectedException.ProcessException(ex, context);
            }

            TestUtilities.AssertFailIfErrors(context);
        }
Ejemplo n.º 2
0
        public void X509Data_HashCodeTests(X509DataComparisonTheoryData theoryData)
        {
            var context = TestUtilities.WriteHeader($"{this}.{nameof(X509Data_HashCodeTests)}", theoryData);

            try
            {
                var firstHashCode  = theoryData.FirstX509Data.GetHashCode();
                var secondHashCode = theoryData.SecondX509Data.GetHashCode();

                Assert.Equal(theoryData.HashShouldMatch, firstHashCode.Equals(secondHashCode));
            }
            catch (Exception ex)
            {
                theoryData.ExpectedException.ProcessException(ex, context);
            }

            TestUtilities.AssertFailIfErrors(context);
        }