Skip to content

Instantly share code, notes, and snippets.

@hatelove
Created December 10, 2014 15:45
Show Gist options
  • Save hatelove/75132499e2a071a3ac11 to your computer and use it in GitHub Desktop.
Save hatelove/75132499e2a071a3ac11 to your computer and use it in GitHub Desktop.
public interface IFoo
{
string Bar(int a, string b);
}
[TestMethod]
public void Test_ReturnFromFunction_CallInfo()
{
var foo = Substitute.For<IFoo>();
foo.Bar(0, "").ReturnsForAnyArgs(x => "Hello " + x.Arg<string>());
Assert.AreEqual("Hello World", foo.Bar(1, "World"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment