Created
May 7, 2010 12:28
-
-
Save jhollingworth/393352 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
class DevTeamContext | |
{ | |
protected static bool ExpectingException; | |
protected static Exception Exception; | |
protected static void dev_team_was_asked_to_do_a_rewrite() | |
{ | |
var ex = Catch.Exception(() => DevTeam.ReWriteFromScratch()); | |
if(ExpectingException) | |
Exception = ex; | |
else | |
throw ex; | |
} | |
} | |
class When_a_development_is_asked_to_do_a_rewrite : DevTeamContext | |
{ | |
Establish context = () => ExpectingException = true; | |
Because the = dev_team_was_asked_to_do_a_rewrite; | |
It should_not_allow_the_dev_team_to_do_a_rewrite = () => Exception.ShouldBeOfType<ProgrammersBeenGivenTooMuchFreedomException>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment