Example #1
0
 public void IsSameMethod_or_derivative_should_be_properly_guarded()
 {
     IsProperlyGuardedConstraint.IsProperlyGuarded(
         () => Helpers.IsSameMethodOrDerivative(typeof(Derived),
                                                typeof(Derived).GetMethod("ToString", new Type[] { }),
                                                typeof(object).GetMethod("ToString", new Type[] { })
                                                )
         );
 }
Example #2
0
        public void Returns_with_call_function_should_be_properly_guarded()
        {
            var config = this.CreateTestableReturnConfiguration();

            IsProperlyGuardedConstraint.IsProperlyGuarded(() => config.Returns(x => x.Arguments.Get <int>(0)));
        }
 public void To_should_be_properly_guarded()
 {
     IsProperlyGuardedConstraint.IsProperlyGuarded(() => ThisCall.To(A.Fake <IFoo>()));
 }