コード例 #1
0
        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);
        }
コード例 #2
0
 public void ShouldThrowWhenInequalityOperatorPerformsIdentityCheck(InequalityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert
         .ExceptionWasThrownForTestType
         <InequalityOperatorValueCheckException, ClassWithInequalityOperatorIdentityCheck>(sut);
 }
コード例 #3
0
 public void ShouldNotThrowWhenInequalityOperatorPerformsValueCheck(InequalityOperatorValueCheckAssertion sut)
 {
     EqualityTestAssert.ExceptionWasNotThrownForTestType<ClassWithInequalityOperatorValueCheck>(sut);
 }
コード例 #4
0
 public void ShouldBeIdiomaticAssertion(InequalityOperatorValueCheckAssertion sut)
 {
     Assert.IsAssignableFrom<IdiomaticAssertion>(sut);
 }