public void CallTo_with_void_call_should_be_null_guarded() { // Arrange var foo = A.Fake <IFoo>(); // Act // Assert NullGuardedConstraint.Assert(() => this.configurationManager.CallTo(() => foo.Bar())); }
public void RemoveRule_should_be_null_guarded() { // Arrange var fake = this.CreateFakeObject <IFoo>(); // Act // Assert NullGuardedConstraint.Assert(() => fake.RemoveRule(ExpressionHelper.CreateRule <IFoo>(x => x.Bar()))); }
public void Generate_fake_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.fakeObjectBuilder.GenerateFake <IFoo>(x => x.Wrapping(A.Fake <IFoo>()))); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new ExpressionCallRule(this.callMatcher)); }
public void CallsTo_for_void_methods_should_be_null_guarded() { NullGuardedConstraint.Assert(() => ES.FullExtensionSyntax.CallsTo(A.Fake <IFoo>(), x => x.Bar())); }
public void AnyCall_should_be_null_guarded() { NullGuardedConstraint.Assert(() => ES.FullExtensionSyntax.AnyCall(A.Fake <IFoo>())); }
public void AssertWasCalled_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.builder.AssertWasCalled(x => true)); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new FakeAssertions <IFoo>(this.fake, this.callMatcherFactory, x => this.fakeAsserter)); }
public void Single_parameter_constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new FakeObject(typeof(IFoo))); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new FakeAsserter <IFoo>(this.fake, A.Fake <ICallCollectionFactory>(), this.callMatcherFactory)); }
public void AnyCall_should_be_null_guarded() { NullGuardedConstraint.Assert(() => A.Fake <IFoo>().AnyCall()); }
public void CallsTo_for_void_methods_should_be_null_guarded() { NullGuardedConstraint.Assert(() => A.Fake <IFoo>().CallsTo(x => x.Bar())); }
public void CallsTo_for_return_value_methods_should_be_null_guarded() { NullGuardedConstraint.Assert(() => "string".CallsTo(x => x.Length)); }
public void Fake_with_arguments_for_constructor_should_be_properly_guarded() { NullGuardedConstraint.Assert(() => this.fakeObjectBuilder.GenerateFake <IFoo>(x => x.WithArgumentsForConstructor(new object[] { "foo", 1 }))); }
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 Create_should_be_null_guarded() { // Assert NullGuardedConstraint.Assert(() => ArgumentValidator <int> .Create(this.validations, x => true, "foo")); }
public void WasCalled_for_functions_with_repeat_predicate_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.asserter.WasCalled(x => x.Baz(), x => x > 10)); }
public void Two_parameters_constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new FakeObject(typeof(string), new object[] { })); }
public void To_should_be_properly_guarded() { NullGuardedConstraint.Assert(() => ThisCall.To(A.Fake <IFoo>())); }
public void Returns_with_call_function_should_be_properly_guarded() { var config = this.CreateTestableReturnConfiguration(); NullGuardedConstraint.Assert(() => config.Returns(x => x.Arguments.Get <int>(0))); }
public void MustHaveHappened_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.builder.MustHaveHappened(Repeated.AtLeast.Once)); }
public void AssignsOutAndRefParameters_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.builder.AssignsOutAndRefParameters()); }
public void WhenArgumentsMatches_from_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.builder.WhenArgumentsMatch(x => true)); }
public void CallsTo_for_return_value_methods_should_be_null_guarded() { NullGuardedConstraint.Assert(() => ES.FullExtensionSyntax.CallsTo("string", x => x.Length)); }
public void AssertWasCalled_should_be_null_guarded() { NullGuardedConstraint.Assert(() => this.configuration.AssertWasCalled(x => true)); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new CallInterceptedEventArgs(A.Fake <IInterceptedFakeObjectCall>())); }
public void Constructor_is_properly_guarded() { NullGuardedConstraint.Assert(() => new ArgumentCollection(new object[] { "foo", 1 }, new[] { "foo", "bar" })); }
public void CreateFake_should_be_null_guarded() { // Arrange, Act, Assert NullGuardedConstraint.Assert(() => this.creator.CreateFake <IFoo>(x => x.Wrapping(A.Fake <IFoo>()))); }
public void Constructor_should_be_null_guarded() { NullGuardedConstraint.Assert(() => new TestableProxyResult(typeof(string))); }