Created
January 14, 2011 23:50
-
-
Save derekgreer/780526 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
[Subject(typeof (FluSectionResultGenerator))] | |
public class when_applicant_provides_information_indicating_flu_susceptibility : given_a_generator_context | |
{ | |
Because of = () => Generator.Run(new[] {new Question("Do you have issues?") {Answer = true},}); | |
It should_reflect_susceptibility_to_the_flu = () => FileSystemMock.Verify(x => x.Read( "a/b/c/susceptable.txt")); | |
} | |
[Subject(typeof (FluSectionResultGenerator))] | |
public class when_applicant_provides_no_information_indicating_flu_susceptibility : given_a_generator_context | |
{ | |
Because of = () => Generator.Run(new[] {new Question("Do you have issues?") {Answer = false},}); | |
It should_not_reflect_susceptibility_to_the_flu = () => FileSystemMock.Verify(x => x.Read("a/b/c/non_susceptable.txt")); | |
} | |
public abstract class given_a_generator_context | |
{ | |
protected static Mock<IFileSystem> FileSystemMock; | |
protected static FluSectionResultGenerator Generator; | |
Establish context = () => | |
{ | |
FileSystemMock = new Mock<IFileSystem>(); | |
Generator = new FluSectionResultGenerator(FileSystemMock.Object); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment