public void HandlingOutParametersInStubs() { // Create a stub. ISampleClass stub = CreateStub(); // Here's how you stub an "out" parameter. int outi; stub.WhenForAnyArgs(s => s.MethodWithOutParameter(out outi)).Do(x => x[0] = 10); // Call method with out parameters. int i; stub.MethodWithOutParameter(out i); i.Should(Be.EqualTo(10)); }