public void Install()
        {
            RetrieveFileDataForTestStep testFileLocation = index => @"c:\a\b";
            UploadReportFilesForTestStep uploader = (index, upload) => { };

            var runner = new Mock<IRunConsoleApplications>();
            {
                runner.Setup(r => r.Run(It.IsAny<string>(), It.IsAny<string[]>()))
                    .Callback(() => runner.Raise(r => r.OnConsoleOutput += null, new ProcessOutputEventArgs("foo")))
                    .Returns(0);
            }

            var fileSystem = new MockFileSystem(
                new Dictionary<string, MockFileData>
                    {
                        {
                            @"c:\a\b\c.msi", new MockFileData("Test file")
                        }
                    });

            var sectionBuilder = new Mock<ITestSectionBuilder>();
            var diagnostics = new SystemDiagnostics((p, s) => { }, null);
            var installer = new MsiDeployTestStepProcessor(
                testFileLocation,
                uploader,
                diagnostics,
                runner.Object,
                fileSystem,
                sectionBuilder.Object);

            var parameters = new List<TestStepParameter>
                {
                    new TestStepParameter
                        {
                            Key = "Key",
                            Value = "Value",
                        },
                };

            var data = new MsiInstallTestStep
            {
                pk_TestStepId = 1,
                Order = 2,
                TestStepParameters = parameters,
            };

            var result = installer.Process(data, new List<InputParameter>());
            Assert.AreEqual(TestExecutionState.Passed, result);
        }
        public void InstallWithExceptionInConsoleRunner()
        {
            RetrieveFileDataForTestStep testFileLocation = index => @"c:\a\b";
            UploadReportFilesForTestStep uploader = (index, upload) => { };

            var runner = new Mock<IRunConsoleApplications>();
            {
                runner.Setup(r => r.Run(It.IsAny<string>(), It.IsAny<string[]>()))
                    .Throws<NotImplementedException>();
            }

            var fileSystem = new MockFileSystem(
                new Dictionary<string, MockFileData>
                    {
                        {
                            @"c:\a\b\c.msi", new MockFileData("Test file")
                        }
                    });

            var sectionBuilder = new Mock<ITestSectionBuilder>();
            var diagnostics = new SystemDiagnostics((p, s) => { }, null);

            var installer = new MsiDeployTestStepProcessor(
                testFileLocation,
                uploader,
                diagnostics,
                runner.Object,
                fileSystem,
                sectionBuilder.Object);

            var data = new MsiInstallTestStep
                {
                    pk_TestStepId = 1,
                    Order = 2,
                };

            var result = installer.Process(data, new List<InputParameter>());
            Assert.AreEqual(TestExecutionState.Failed, result);
        }