public void ShouldThrowWhenInequalityOperatorIsOverloadedWithParametersOtherThanTypeDefiningOperator(
     InequalityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <InequalityOperatorException,
      ClassWhichOverloadInequalityOperatorWithParametersOtherThanTypeDefiningOperator>(sut);
 }
 public void ShouldThrowWhenGetHashCodeProducesHashBasedOnIdentity(GetHashCodeValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <GetHashCodeValueCheckException, IdentityObjectHashCodeExample>(sut);
 }
 public void ShouldThrowExceptionWhenIEquatableIsImplementedWithoutTypeThatImplementsInterface(IEquatableImplementedAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <IEquatableImplementedException, ClassThatImplementsIEquatableWithOtherType>(sut);
 }
 public void ShouldThrowExceptionWhenIEquatableIsNotImplemented(IEquatableImplementedAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <IEquatableImplementedException, ClassWhichDoesNotImplementIEquatable>(sut);
 }
Example #5
0
 public void ShouldThrowWhenEqualityOperatorIsOverloadedWithArgumentsOtherThanContainingType(
     EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType
     <EqualityOperatorException, ClassThatOverloadsEqualityOperatorWithArgumentsOtherThanContainingType>(sut);
 }
Example #6
0
 public void ShouldThrowWhenEqualityOperatorIsNotOverloaded(EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <EqualityOperatorException, ClassWhichDoesNotOverloadsEqualityOperator>(
         sut);
 }
Example #7
0
 public void ShouldThrowWhenIdentityCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <EqualsValueCheckException, object>(sut);
 }
Example #8
0
 public void ShouldThrowWhenNotEveryCtorArgumentInfluenceEquality(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <EqualsValueCheckException, ValueObjectButSecondCtrArgDoesntTakePartInEqualsImpl>(sut);
 }
 public void ShouldThrowExceptionWhenIdentityCheckInEqualityOperator(EqualityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <EqualityOperatorValueCheckException, ClassWithEqualityOperatorIdentityCheck>(sut);
 }
Example #10
0
 public void ShouldThrowWhenIEquatableEqualsPerformsIdentityCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <IEquatableValueCheckException, IEquatableWithIdentityCheck>
         (sut);
 }