Created
January 24, 2009 22:16
-
-
Save agross/51573 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public abstract class with_string_parser | |
{ | |
protected static DateTime ParsedDate; | |
protected static IParser Parser; | |
protected Because of = () => { ParsedDate = Parser.Parse("2009/01/21"); }; | |
} | |
public class when_a_date_is_parsed_by_the_infrastructure : with_string_parser | |
{ | |
Establish context = () => { Parser = new InfrastructureParser(); }; | |
It_should_behave_like a_second = () => new SecondaryBehavior(); | |
} | |
public class SecondaryBehavior | |
{ | |
protected static DateTime ParsedDate; | |
It should_parse_the_expected_date_second = () => ParsedDate.ShouldEqual(new DateTime(2009, 1, 21)); | |
It_should_behave_like a_third = () => new NestedThirdBehavior(); | |
} | |
public class NestedThirdBehavior | |
{ | |
protected static DateTime ParsedDate; | |
It should_parse_the_expected_date_nested_third = () => ParsedDate.ShouldEqual(new DateTime(2009, 1, 21)); | |
It is_not_implemented_nested_third; | |
[Ignore] | |
It is_ignored_nested_third; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment