public void UsingArrayAndOutParam() { MockRepository mockRepository = new MockRepository(); ITest test = mockRepository.StrictMock <ITest>(); string b; test.ArrayWithOut(new string[] { "data" }, out b); LastCall.Return("SuccessWithOut1").OutRef("SuccessWithOut2"); mockRepository.ReplayAll(); Console.WriteLine(test.ArrayWithOut(new string[] { "data" }, out b)); Console.WriteLine(b); }
public void UsingArrayAndOutParam() { string b; ITest test = MockRepository.Mock <ITest>(); test.Expect(x => x.ArrayWithOut(Arg <string[]> .List.IsIn("data"), out Arg <string> .Out("SuccessWithOut2").Dummy)) .Return("SuccessWithOut1"); string result = test.ArrayWithOut(new string[] { "data" }, out b); Assert.Equal("SuccessWithOut2", b); Assert.Equal("SuccessWithOut1", result); }