Skip to content

Instantly share code, notes, and snippets.

@JonCanning
Last active January 3, 2016 09:59
Show Gist options
  • Save JonCanning/8446758 to your computer and use it in GitHub Desktop.
Save JonCanning/8446758 to your computer and use it in GitHub Desktop.
GivenWhen base class for tests
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