public void ShouldThrowWhenInequalityOperatorIsOverloadedWithParametersOtherThanTypeDefiningOperator(
     InequalityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <InequalityOperatorException,
      ClassWhichOverloadInequalityOperatorWithParametersOtherThanTypeDefiningOperator>(sut);
 }
コード例 #2
0
 public void ShouldNotThrowWhenGetHashCodeProducesHashBasedOnValues(GetHashCodeValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ValueObjectHashCodeExample>(sut);
 }
コード例 #3
0
 public void ShouldThrowWhenGetHashCodeProducesHashBasedOnIdentity(GetHashCodeValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <GetHashCodeValueCheckException, IdentityObjectHashCodeExample>(sut);
 }
コード例 #4
0
 public void ShouldThrowExceptionWhenIEquatableIsImplementedWithoutTypeThatImplementsInterface(IEquatableImplementedAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <IEquatableImplementedException, ClassThatImplementsIEquatableWithOtherType>(sut);
 }
コード例 #5
0
 public void ShouldThrowExceptionWhenIEquatableIsNotImplemented(IEquatableImplementedAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <IEquatableImplementedException, ClassWhichDoesNotImplementIEquatable>(sut);
 }
コード例 #6
0
 public void ShouldNotThrowExceptionWhenIEquatableIsImplemented(IEquatableImplementedAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ClassThatImplementsIEquatable>(sut);
 }
コード例 #7
0
 public void ShouldThrowWhenEqualityOperatorIsOverloadedWithArgumentsOtherThanContainingType(
     EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType
     <EqualityOperatorException, ClassThatOverloadsEqualityOperatorWithArgumentsOtherThanContainingType>(sut);
 }
コード例 #8
0
 public void ShouldThrowWhenEqualityOperatorIsNotOverloaded(EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType <EqualityOperatorException, ClassWhichDoesNotOverloadsEqualityOperator>(
         sut);
 }
コード例 #9
0
 public void ShouldNotThrowWhenEqualityOperatorIsOverloaded(EqualityOperatorOverloadAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ClassWhichOverloadsEqualityOperator>(sut);
 }
コード例 #10
0
 public void ShouldThrowWhenIdentityCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <EqualsValueCheckException, object>(sut);
 }
コード例 #11
0
 public void ShouldThrowWhenNotEveryCtorArgumentInfluenceEquality(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <EqualsValueCheckException, ValueObjectButSecondCtrArgDoesntTakePartInEqualsImpl>(sut);
 }
コード例 #12
0
 public void ShouldNotThrowWhenValueCheckInEqualsImplementation(EqualsValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ValueObjectExample>(sut);
 }
コード例 #13
0
 public void ShouldNotThrowExceptionWhenEqualityOperatorPerformsValueCheck(
     EqualityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <ClassWithEqualityOperatorValueCheck>(sut);
 }
コード例 #14
0
 public void ShouldThrowExceptionWhenIdentityCheckInEqualityOperator(EqualityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert
     .ExceptionWasThrownForTestType
     <EqualityOperatorValueCheckException, ClassWithEqualityOperatorIdentityCheck>(sut);
 }
コード例 #15
0
 public void ShouldNotThrowWhenIEquatablePerformsValueCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType <IEquatableWithValueCheck>(sut);
 }
コード例 #16
0
 public void ShouldThrowWhenIEquatableEqualsPerformsIdentityCheck(IEquatableValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasThrownForTestType <IEquatableValueCheckException, IEquatableWithIdentityCheck>
         (sut);
 }