Last active
January 3, 2016 09:59
-
-
Save JonCanning/8446758 to your computer and use it in GitHub Desktop.
GivenWhen base class for tests
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
abstract class Given | |
{ | |
protected static When Given_(Action action) | |
{ | |
action(); | |
return new When(); | |
} | |
protected class When | |
{ | |
public When And_(Action action) | |
{ | |
action(); | |
return this; | |
} | |
public And When_(Action action) | |
{ | |
action(); | |
return new And(); | |
} | |
} | |
protected class And | |
{ | |
public And And_(Action action) | |
{ | |
action(); | |
return this; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment