Example #1
0
        public void MethodCall_WithResultIsNotNull_DoesNotThrow()
        {
            var testModel = TestModel.MakeValidInstance();

            testModel.Invoking(it => it.CheckForResultNull(false)).Should().NotThrow();
        }
Example #2
0
        public void MethodCall_WithResultStruct_DoesNotThrow()
        {
            var testModel = TestModel.MakeValidInstance();

            testModel.Invoking(it => it.CheckForResultNullButIsValueType()).Should().NotThrow();
        }
Example #3
0
        public void MethodCall_WithResultStringIsNull_Throws()
        {
            var testModel = TestModel.MakeValidInstance();

            testModel.Invoking(it => it.CheckForResultStringNull()).Should().Throw <PostconditionViolatedException>();
        }