Created
May 23, 2011 09:15
-
-
Save stefansedich/986448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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