Skip to content

Instantly share code, notes, and snippets.

@stefansedich
Created May 23, 2011 09:15
Show Gist options
  • Save stefansedich/986448 to your computer and use it in GitHub Desktop.
Save stefansedich/986448 to your computer and use it in GitHub Desktop.
[Test]
public void Some_Test_Rhino()
{
// Arrange
var foo = MockRepository.GenerateStub<IFoo>();
var someClass = new SomeClass(foo);
// Act
someClass.DoWork();
// Assert
foo.AssertWasCalled(x => x.Bah());
}
[Test]
public void Some_Test_NSubstitute()
{
// Arrange
var foo = Substitute.For<IFoo>();
var someClass = new SomeClass(foo);
// Act
someClass.DoWork();
// Assert
foo.Received().Bah();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment