예제 #1
0
        public void Constructor_that_takes_method_is_properly()
        {
            var method = typeof(IFoo).GetMethod("Bar", new[] { typeof(object), typeof(object) });

            IsProperlyGuardedConstraint.IsProperlyGuarded(() =>
                                                          new ArgumentCollection(new object[] { "foo", 1 }, method));
        }
예제 #2
0
        public void Matching_with_action_call_should_be_properly_guarded()
        {
            var foo        = new FakeObject(typeof(IFoo));
            var collection = new CallCollection <IFoo>(foo);

            IsProperlyGuardedConstraint.IsProperlyGuarded(() => collection.Matching(x => x.Bar()));
        }
예제 #3
0
 public void Fake_with_arguments_for_constructor_should_be_properly_guarded()
 {
     IsProperlyGuardedConstraint.IsProperlyGuarded(() =>
                                                   A.Fake <AbstractClassWithNoDefaultConstructor>(new object[] { "foo", 1 }));
 }
예제 #4
0
 public void Fake_with_wrapper_should_be_guarded_correctly()
 {
     IsProperlyGuardedConstraint.IsProperlyGuarded(() => A.Fake(A.Fake <IFoo>()));
 }
예제 #5
0
 public void Constructor_is_properly_guarded()
 {
     IsProperlyGuardedConstraint.IsProperlyGuarded(() =>
                                                   new ArgumentCollection(new object[] { "foo", 1 }, new[] { "foo", "bar" }));
 }