public void ShouldExplainWhyExceptionIsThrownWhenInequalityOperatorPerformsIdentityCheck(InequalityOperatorValueCheckAssertion sut) { var exception = Record.Exception( () => sut.Verify(typeof(ClassWithInequalityOperatorIdentityCheck))); Assert.Contains( string.Format( "Expected type {0} != operator to perform value check but looks like it performs identity check", typeof (ClassWithInequalityOperatorIdentityCheck).Name), exception.Message); }
public void ShouldThrowWhenInequalityOperatorPerformsIdentityCheck(InequalityOperatorValueCheckAssertion sut) { EqualityTestAssert .ExceptionWasThrownForTestType <InequalityOperatorValueCheckException, ClassWithInequalityOperatorIdentityCheck>(sut); }
public void ShouldNotThrowWhenInequalityOperatorPerformsValueCheck(InequalityOperatorValueCheckAssertion sut) { EqualityTestAssert.ExceptionWasNotThrownForTestType<ClassWithInequalityOperatorValueCheck>(sut); }
public void ShouldBeIdiomaticAssertion(InequalityOperatorValueCheckAssertion sut) { Assert.IsAssignableFrom<IdiomaticAssertion>(sut); }