Created
August 22, 2011 02:11
-
-
Save MattHoneycutt/1161506 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
public class when_creating_an_issue : given.the_default_state | |
{ | |
...snip... | |
} | |
public static class given | |
{ | |
public abstract class the_default_state : SpecsFor<AddIssueController> | |
{ | |
protected User TestUser; | |
protected User CreatorUser; | |
public override void Given() | |
{ | |
TestUser = User.CreateNewUser("test@user.com", "blah"); | |
TestUser.ID = Guid.NewGuid(); | |
CreatorUser = User.CreateNewUser("some@user.com", "blah"); | |
CreatorUser.ID = Guid.NewGuid(); | |
GetMockFor<IRepository<User>>() | |
.Setup(s => s.Query()) | |
.Returns((new[] { CreatorUser, TestUser }).AsQueryable()); | |
//Similar code for setting up a project | |
...snip... | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment