예제 #1
0
 public void ShouldNotThrowWhenIEquatablePerformsValueCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <IEquatableWithValueCheck>(sut);
 }
예제 #2
0
 public void ShouldThrowWhenIEquatableEqualsPerformsIdentityCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <IEquatableValueCheckException, IEquatableWithIdentityCheck>
         (sut);
 }
예제 #3
0
        public void ShouldExplainWhyExceptionIsThrownWhenIEquatablePerformsIdentityCheck(IEquatableValueCheckAssertion sut)
        {
            var exception = Record.Exception(
                () => sut.Verify(typeof(IEquatableWithIdentityCheck)));

            Assert.Contains(
                string.Format(
                    "Expected IEquatable<{0}>.Equals method to perform value check but looks like it performs identity check",
                    typeof(IEquatableWithIdentityCheck).Name), exception.Message);
        }
예제 #4
0
 public void ShouldBeIdiomaticAssertion(IEquatableValueCheckAssertion sut)
 {
     Assert.IsAssignableFrom <IdiomaticAssertion>(sut);
 }