/// <summary>
        /// Initializes a new instance of the <see cref="VsTestConsoleWrapper"/> class.
        /// </summary>
        /// <param name="requestSender">Sender for test messages.</param>
        /// <param name="processManager">Process manager.</param>
        /// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
        /// <param name="testPlatformEventSource">Performance event source</param>
        /// <param name="processHelper">Helper for process related utilities</param>
        internal VsTestConsoleWrapper(ITranslationLayerRequestSender requestSender, IProcessManager processManager, ConsoleParameters consoleParameters, ITestPlatformEventSource testPlatformEventSource, IProcessHelper processHelper)
        {
            this.requestSender = requestSender;
            this.vstestConsoleProcessManager = processManager;
            this.consoleParameters           = consoleParameters;
            this.testPlatformEventSource     = testPlatformEventSource;
            this.processHelper = processHelper;
            this.pathToAdditionalExtensions = new List <string>();

            this.vstestConsoleProcessManager.ProcessExited += (sender, args) => this.requestSender.OnProcessExited();
            this.sessionStarted = false;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="VsTestConsoleWrapper"/> class.
 /// Defined for testing
 /// </summary>
 /// <param name="vstestConsolePath">Path to the test runner <c>vstest.console.exe</c>.</param>
 /// <param name="dotnetExePath">Path to dotnet exe, needed for CI builds</param>
 /// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
 internal VsTestConsoleWrapper(string vstestConsolePath, string dotnetExePath, ConsoleParameters consoleParameters) :
     this(new VsTestConsoleRequestSender(), new VsTestConsoleProcessManager(vstestConsolePath, dotnetExePath), consoleParameters, TestPlatformEventSource.Instance, new ProcessHelper())
 {
 }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VsTestConsoleWrapper"/> class.
        /// </summary>
        /// <param name="requestSender">Sender for test messages.</param>
        /// <param name="processManager">Process manager.</param>
        /// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
        internal VsTestConsoleWrapper(ITranslationLayerRequestSender requestSender, IProcessManager processManager, ConsoleParameters consoleParameters)
        {
            this.requestSender = requestSender;
            this.vstestConsoleProcessManager = processManager;
            this.consoleParameters           = consoleParameters;

            this.vstestConsoleProcessManager.ProcessExited += (sender, args) => this.requestSender.OnProcessExited();
            this.sessionStarted = false;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="VsTestConsoleWrapper"/> class.
 /// </summary>
 /// <param name="vstestConsolePath">Path to the test runner <c>vstest.console.exe</c>.</param>
 /// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
 public VsTestConsoleWrapper(string vstestConsolePath, ConsoleParameters consoleParameters) :
     this(new VsTestConsoleRequestSender(), new VsTestConsoleProcessManager(vstestConsolePath), consoleParameters, TestPlatformEventSource.Instance)
 {
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VsTestConsoleWrapper"/> class.
 /// </summary>
 /// <param name="vstestConsolePath">Path to the test runner <c>vstest.console.exe</c>.</param>
 /// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
 public VsTestConsoleWrapper(string vstestConsolePath, ConsoleParameters consoleParameters) :
     this(new VsTestConsoleRequestSender(), new VsTestConsoleProcessManager(vstestConsolePath), consoleParameters)
 {
 }