Skip to content

Instantly share code, notes, and snippets.

@phatboyg
Created December 7, 2009 02:56
Show Gist options
  • Save phatboyg/250561 to your computer and use it in GitHub Desktop.
Save phatboyg/250561 to your computer and use it in GitHub Desktop.
[Test]
public void mock()
{
Func<int,int> mocked = MockRepository.GenerateMock<Func<int, int>>();
mocked.Expect(x => x(27)).Return(47);
int result = mocked(27);
mocked.VerifyAllExpectations();
result.ShouldEqual(47);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment