Created
May 11, 2012 18:47
-
-
Save jmarnold/2661646 to your computer and use it in GitHub Desktop.
Yup
This file contains hidden or 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
[TestFixture] | |
public class showing_you_my_junk | |
{ | |
private ISomething theSomethingA; | |
private ISomething theSomethingB; | |
private SomethingElse theClassUnderTest; | |
[SetUp] | |
public void SetUp() | |
{ | |
theSomethingA = MockRepository.GenerateStub<ISomething>(); | |
theSomethingB = MockRepository.GenerateStub<ISomething>(); | |
theClassUnderTest = new SomethingElse(new [] { theSomethingA, theSomethingB }); | |
} | |
[Test] | |
public void look_at_these() | |
{ | |
var someObject = Guid.New(); | |
theSomethingA.Stub(x => x.Matches()).Returns(true); | |
theSomethingA.Stub(x => x.BuildIt()).Returns(someObject); | |
theClassUnderTest.UseTheImplementations().ShouldEqual(someObject); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment