Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.39 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Stubbing out parameters with pre-existing values in FakeItEasy
  2. List<Foo> ignored;
  3. A.CallTo(() => fake.Method(out ignored))
  4.   .Returns(something);
  5.        
  6. List<Foo> target;
  7. var result = service.Method(out target);
  8.        
  9. List<Foo> target = new List<Foo>();
  10. var result = service.Method(out target);
  11.        
  12. List<Foo> ignored;
  13. A.CallTo(() => fake.Method(out ignored))
  14.   .WithAnyArguments()
  15.   .Returns(something);