示例#1
0
        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);
        }
示例#2
0
        public PageTests()
        {
            capture = Substitute.For <ICaptureOutput>();
            driver  = Substitute.For <IConsoleDriver>();
            driver
            .Output
            .Returns(capture);

            driver
            .Keyboard
            .Returns(Substitute.For <IKeyboardSimulator>());
        }