public ConsoleDriver(string file, string arguments = null) { proc = new Process(); proc.StartInfo.FileName = file; proc.StartInfo.Arguments = arguments; proc.StartInfo.UseShellExecute = true; Keyboard = new InputSimulator().Keyboard; Output = new CaptureOutputUsingCliboard(Keyboard); }
public PageTests() { capture = Substitute.For <ICaptureOutput>(); driver = Substitute.For <IConsoleDriver>(); driver .Output .Returns(capture); driver .Keyboard .Returns(Substitute.For <IKeyboardSimulator>()); }