public void ShouldNotThrowWhenIEquatablePerformsValueCheck(IEquatableValueCheckAssertion sut) { EqualityTestAssert.ExceptionWasNotThrownForTestType <IEquatableWithValueCheck>(sut); }
public void ShouldThrowWhenIEquatableEqualsPerformsIdentityCheck(IEquatableValueCheckAssertion sut) { EqualityTestAssert.ExceptionWasThrownForTestType <IEquatableValueCheckException, IEquatableWithIdentityCheck> (sut); }
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); }
public void ShouldBeIdiomaticAssertion(IEquatableValueCheckAssertion sut) { Assert.IsAssignableFrom <IdiomaticAssertion>(sut); }