public void ShouldExplainWhyExceptionIsThrownWhenEqualsIsIdentityCheck(EqualsValueCheckAssertion sut)
        {
            var exception = Record.Exception(
                () => sut.Verify(typeof (object)));

            Assert.Equal(
                string.Format("Expected type {0} to perform value check but looks like it performs identity check", typeof (object).Name),
                exception.Message);
        }
        public void ShouldExplainWhyExceptionIsThrownWhenCtorArgDoesNotInfluenceEquality(EqualsValueCheckAssertion sut)
        {
            var exception = Record.Exception(
                () => sut.Verify(typeof (ValueObjectButSecondCtrArgDoesntTakePartInEqualsImpl)));

            Assert.Equal(
                string.Format("Expected {0} to be not equal to {0}",
                    new ValueObjectButSecondCtrArgDoesntTakePartInEqualsImpl(1,1)), exception.Message);
        }
 public void ShouldThrowWhenNotEveryCtorArgumentInfluenceEquality(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert
         .ExceptionWasThrownForTestType
         <EqualsValueCheckException, ValueObjectButSecondCtrArgDoesntTakePartInEqualsImpl>(sut);
 }
 public void ShouldThrowWhenIdentityCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType<EqualsValueCheckException, object>(sut);
 }
 public void ShouldNotThrowWhenValueCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType<ValueObjectExample>(sut);
 }
 public void ShouldBeIdiomaticAssertion(EqualsValueCheckAssertion sut)
 {
     Assert.IsAssignableFrom<IdiomaticAssertion>(sut);
 }