public void ShouldThrowWhenInequalityOperatorIsOverloadedWithParametersOtherThanTypeDefiningOperator(
     InequalityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <InequalityOperatorException,
      ClassWhichOverloadInequalityOperatorWithParametersOtherThanTypeDefiningOperator>(sut);
 }
 public void ShouldNotThrowWhenGetHashCodeProducesHashBasedOnValues(GetHashCodeValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ValueObjectHashCodeExample>(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);
 }
 public void ShouldNotThrowExceptionWhenIEquatableIsImplemented(IEquatableImplementedAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ClassThatImplementsIEquatable>(sut);
 }
Ejemplo n.º 7
0
 public void ShouldThrowWhenEqualityOperatorIsOverloadedWithArgumentsOtherThanContainingType(
     EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType
     <EqualityOperatorException, ClassThatOverloadsEqualityOperatorWithArgumentsOtherThanContainingType>(sut);
 }
Ejemplo n.º 8
0
 public void ShouldThrowWhenEqualityOperatorIsNotOverloaded(EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <EqualityOperatorException, ClassWhichDoesNotOverloadsEqualityOperator>(
         sut);
 }
Ejemplo n.º 9
0
 public void ShouldNotThrowWhenEqualityOperatorIsOverloaded(EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ClassWhichOverloadsEqualityOperator>(sut);
 }
Ejemplo n.º 10
0
 public void ShouldThrowWhenIdentityCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <EqualsValueCheckException, object>(sut);
 }
Ejemplo n.º 11
0
 public void ShouldThrowWhenNotEveryCtorArgumentInfluenceEquality(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <EqualsValueCheckException, ValueObjectButSecondCtrArgDoesntTakePartInEqualsImpl>(sut);
 }
Ejemplo n.º 12
0
 public void ShouldNotThrowWhenValueCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ValueObjectExample>(sut);
 }
 public void ShouldNotThrowExceptionWhenEqualityOperatorPerformsValueCheck(
     EqualityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ClassWithEqualityOperatorValueCheck>(sut);
 }
 public void ShouldThrowExceptionWhenIdentityCheckInEqualityOperator(EqualityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <EqualityOperatorValueCheckException, ClassWithEqualityOperatorIdentityCheck>(sut);
 }
Ejemplo n.º 15
0
 public void ShouldNotThrowWhenIEquatablePerformsValueCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <IEquatableWithValueCheck>(sut);
 }
Ejemplo n.º 16
0
 public void ShouldThrowWhenIEquatableEqualsPerformsIdentityCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <IEquatableValueCheckException, IEquatableWithIdentityCheck>
         (sut);
 }