Пример #1
0
        protected Runner MockRunner()
        {
            var runner = Mocks.StrictMock <Runner>();

            runner.SetPropertyAsBehavior(v => v.Command);

            var asyncResults = new TestAsyncResults();

            runner.Expect(v => v.BeginExecute()).Return(asyncResults);

            runner.ErrorOutputReceived += null;
            LastCall.IgnoreArguments();

            runner.SetPropertyAsBehavior(v => v.ErrorOutput);
            runner.SetPropertyAsBehavior(v => v.Output);

            return(runner);
        }
Пример #2
0
        protected Runner MockRunner()
        {
            var runner = Mocks.StrictMock<Runner>();

            runner.SetPropertyAsBehavior(v => v.Command);

            var asyncResults = new TestAsyncResults();

            runner.Expect(v => v.BeginExecute()).Return(asyncResults);

            runner.ErrorOutputReceived += null;
            LastCall.IgnoreArguments();

            runner.SetPropertyAsBehavior(v => v.ErrorOutput);
            runner.SetPropertyAsBehavior(v => v.Output);

            return runner;
        }