Created
August 7, 2012 23:28
-
-
Save bsommardahl/3290526 to your computer and use it in GitHub Desktop.
When a plumber fixes a sink... to fail
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
namespace RentAPlumber.Specs | |
{ | |
public class when_a_plumber_fixes_a_sink | |
{ | |
static Plumber _plumber; | |
static Sink _sink; | |
Establish context = () => | |
{ | |
_plumber = new Plumber(); | |
_sink = new Sink | |
{ | |
Leaks = new List<Leak> | |
{ | |
new Leak(), | |
new Leak() | |
} | |
}; | |
}; | |
Because of = () => _plumber.FixSink(_sink); | |
It should_ensure_that_the_pipes_do_not_leak = () => _sink.Leaks.ShouldBeEmpty(); | |
} | |
public class Sink | |
{ | |
public List<Leak> Leaks { get; set; } | |
} | |
public class Leak | |
{ | |
} | |
public class Plumber | |
{ | |
public void FixSink(Sink sink) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment