-
-
Save philiplaureano/969956 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
var testHarness = new TestHarness(); | |
// The processors decide which methods should be replaced and how they should behave once the method is called | |
var consoleTestProcessor = new ConsoleTestProcessor(); | |
testHarness.Processors.Add(consoleTestProcessor); | |
var fileSystemTestProcessor = new FileSystemTestProcessor(); | |
fileSystemTestProcessor.AddMockFile(@"c:\foo.txt", "bar"); | |
testHarness.Processors.Add(fileSystemTestProcessor); | |
var dateTimeProcessor = new DateTimeProcessor(new DateTime(2010, 01, 25)); | |
testHarness.Processors.Add(dateTimeProcessor); | |
// IDEA: Clone the method from the lambda and run the method clone | |
testHarness.Run(() => { | |
new Foo().Bar(); | |
}); | |
Assert.AreEqual(@"Fizz | |
Buzz | |
FizzBuzz", consoleTestProcessor.OutputText); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment