Skip to content

Instantly share code, notes, and snippets.

@coreyhaines
Created January 29, 2009 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreyhaines/54745 to your computer and use it in GitHub Desktop.
Save coreyhaines/54745 to your computer and use it in GitHub Desktop.
public static class ThingTestingUtilities {
public static Thing NewThing(this TestsThings tester) {
return new MyThing;
}
public static Thing WithDueDate(this MyThing thing, DateTime duedate) {
thing.DueDate = duedate;
return thing;
}
public static Thing WithAnOffsetDueDateInDays(this MyThing thing, int days){
return thing.WithDueDate(DateTime.Now.AddDays(days));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment