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)); }
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())); }
public void Fake_with_arguments_for_constructor_should_be_properly_guarded() { IsProperlyGuardedConstraint.IsProperlyGuarded(() => A.Fake <AbstractClassWithNoDefaultConstructor>(new object[] { "foo", 1 })); }
public void Fake_with_wrapper_should_be_guarded_correctly() { IsProperlyGuardedConstraint.IsProperlyGuarded(() => A.Fake(A.Fake <IFoo>())); }
public void Constructor_is_properly_guarded() { IsProperlyGuardedConstraint.IsProperlyGuarded(() => new ArgumentCollection(new object[] { "foo", 1 }, new[] { "foo", "bar" })); }