public void Apply_should_assign_reference_arguments() { // Arrange var wrapped = new TypeThatImplementsInterfaceWithOutAndRefArguments() { ReferenceArgumentThatWillBeApplied = 10 }; var call = FakeCall.Create<ITypeWithOutAndRefArguments>("MethodWithReferenceArgument", new[] { Type.GetType("System.Int32&") }, new object[] { 0 }); var rule = this.CreateRule(wrapped); // Act rule.Apply(call); // Assert Assert.That(call.Arguments[0], Is.EqualTo(10)); }
public void Apply_should_assign_out_arguments() { // Arrange var wrapped = new TypeThatImplementsInterfaceWithOutAndRefArguments() { OutArgumentThatWillBeApplied = 10 }; var call = FakeCall.Create <ITypeWithOutAndRefArguments>("MethodWithOutArgument", new[] { Type.GetType("System.Int32&") }, new object[] { 0 }); var rule = this.CreateRule(wrapped); // Act rule.Apply(call); // Assert Assert.That(call.Arguments[0], Is.EqualTo(10)); }