public void CallTo_with_void_call_should_be_null_guarded() { // Arrange var foo = A.Fake <IFoo>(); // Act // Assert NullGuardedConstraint.Assert(() => A.CallTo(() => foo.Bar())); }
public void Assert_should_be_null_guarded() { try { NullGuardedConstraint.Assert(null); Assert.Fail("Exception should be thrown."); } catch (ArgumentNullException ex) { Assert.That(ex.ParamName, Is.EqualTo("call")); } }
public void GetCalls_is_properly_guarded() { NullGuardedConstraint.Assert(() => Fake.GetCalls(A.Fake <IFoo>())); }
public void Constructor_that_takes_method_is_properly_null_guarded() { var method = typeof(IFoo).GetMethod("Bar", new[] { typeof(object), typeof(object) }); NullGuardedConstraint.Assert(() => new ArgumentCollection(new object[] { "foo", 1 }, method)); }
public void Fake_should_be_null_guarded() { NullGuardedConstraint.Assert(() => Configure.Fake(A.Fake <IFoo>())); }
public void Constructor_that_takes_arguments_for_constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new Fake <Foo>(new object[] { A.Fake <IServiceProvider>() })); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new CallCollection <IFoo>(new FakeObject(), x => (ExpressionCallMatcher)null)); }
public MethodCallConstraintState(MethodCallExpression expression) : base(GetExpressionArguments(expression)) { this.method = expression.Method; this.target = NullGuardedConstraint.GetValueProducedByExpression(expression.Object); }
public void SetUp() { this.constraint = new NullGuardedConstraint(); this.writer = new TextMessageWriter(); }
public void Fake_with_arguments_for_constructor_should_be_properly_guarded() { NullGuardedConstraint.Assert(() => A.Fake <IFoo>(new object[] { "foo", 1 })); }
public void Setup() { this.constraint = new NullGuardedConstraint(); this.writer = new TextMessageWriter(); }
public void WriteCalls_should_throw_when_calls_is_null() { NullGuardedConstraint.Assert(() => FakeExtensions.Write(Enumerable.Empty <IFakeObjectCall>(), A.Dummy <IOutputWriter>())); }
public void Write_should_be_null_guarded() { NullGuardedConstraint.Assert(() => Enumerable.Empty <IFakeObjectCall>().Write(A.Dummy <IOutputWriter>())); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new FakeObjectFactory(this.container)); }
public void Assert_should_delegate_to_constraint() { Assert.Throws <AssertionException>(() => NullGuardedConstraint.Assert(() => UnguardedMethod("foo"))); }
public void Fake_with_wrapped_instance_and_recorder_should_be_null_guarded() { NullGuardedConstraint.Assert(() => A.Fake <IFoo>(A.Fake <IFoo>(), A.Fake <ISelfInitializingFakeRecorder>())); }
public void Fake_with_wrapper_should_be_guarded_correctly() { NullGuardedConstraint.Assert(() => A.Fake(A.Fake <IFoo>())); }
public void Pairwise_should_be_null_guarded() { NullGuardedConstraint.Assert(() => CommonExtensions.Zip(new List <string>(), new List <string>())); }
public void Fake_with_arguments_for_constructor_should_be_properly_guarded() { NullGuardedConstraint.Assert(() => A.Fake <AbstractClassWithNoDefaultConstructor>(new object[] { "foo", 1 })); }
public void ReturnsNull_should_be_null_guarded() { NullGuardedConstraint.Assert(() => FakeExtensions.ReturnsNull(A.Fake <IReturnValueConfiguration <IFoo, string> >())); }
public void To_should_be_properly_guarded() { NullGuardedConstraint.Assert(() => NextCall.To(A.Fake <IFoo>())); }
public void Constructor_that_takes_wrapped_instance_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new Fake <IFoo>(A.Fake <IFoo>())); }
public void Constructor_is_properly_guarded() { NullGuardedConstraint.Assert(() => new ArgumentCollection(new object[] { "foo", 1 }, new[] { "foo", "bar" })); }
public void Constructor_that_takes_constructor_expression_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new Fake <Foo>(() => new Foo(A.Fake <IServiceProvider>()))); }
public void IsEmpty_should_be_null_guarded() { NullGuardedConstraint.Assert(() => CommonExtensions.IsEmpty(new List <string>())); }