Exemplo n.º 1
0
 public ProxyOperationManagerTests()
 {
     this.mockTestHostManager = new Mock <ITestHostManager>();
     this.mockRequestSender   = new Mock <ITestRequestSender>();
     this.mockRequestSender.Setup(rs => rs.WaitForRequestHandlerConnection(this.connectionTimeout)).Returns(true);
     this.testOperationManager = new TestableProxyOperationManager(this.mockRequestSender.Object, this.mockTestHostManager.Object, this.connectionTimeout);
 }
Exemplo n.º 2
0
 public ProxyOperationManagerTests()
 {
     this.mockRequestSender = new Mock <ITestRequestSender>();
     this.mockRequestSender.Setup(rs => rs.WaitForRequestHandlerConnection(connectionTimeout, It.IsAny <CancellationToken>())).Returns(true);
     this.mockRequestData = new Mock <IRequestData>();
     this.mockRequestData.Setup(rd => rd.MetricsCollection).Returns(new Mock <IMetricsCollection>().Object);
     this.testOperationManager = new TestableProxyOperationManager(this.mockRequestData.Object, this.mockRequestSender.Object, this.mockTestHostManager.Object);
 }
        public ProxyOperationManagerTests()
        {
            this.mockTestHostManager = new Mock <ITestRuntimeProvider>();
            this.mockRequestSender   = new Mock <ITestRequestSender>();
            this.mockRequestSender.Setup(rs => rs.WaitForRequestHandlerConnection(this.connectionTimeout)).Returns(true);
            this.testOperationManager = new TestableProxyOperationManager(this.mockRequestSender.Object, this.mockTestHostManager.Object, this.connectionTimeout);

            this.mockTestHostManager.Setup(m =>
                                           m.GetTestHostProcessStartInfo(It.IsAny <IEnumerable <string> >(),
                                                                         It.IsAny <IDictionary <string, string> >(),
                                                                         It.IsAny <TestRunnerConnectionInfo>()))
            .Returns(new TestProcessStartInfo());
        }
Exemplo n.º 4
0
        public ProxyOperationManagerTests()
        {
            this.mockTestHostManager = new Mock <ITestRuntimeProvider>();
            this.mockRequestSender   = new Mock <ITestRequestSender>();
            this.mockRequestSender.Setup(rs => rs.WaitForRequestHandlerConnection(this.connectionTimeout)).Returns(true);
            this.testOperationManager = new TestableProxyOperationManager(this.mockRequestSender.Object, this.mockTestHostManager.Object, this.connectionTimeout);

            this.mockTestHostManager.Setup(
                m => m.GetTestHostProcessStartInfo(
                    It.IsAny <IEnumerable <string> >(),
                    It.IsAny <IDictionary <string, string> >(),
                    It.IsAny <TestRunnerConnectionInfo>()))
            .Returns(new TestProcessStartInfo());

            this.mockTestHostManager.Setup(tmh => tmh.LaunchTestHostAsync(It.IsAny <TestProcessStartInfo>(), It.IsAny <CancellationToken>()))
            .Callback(() => this.mockTestHostManager.Raise(t => t.HostLaunched += null, new HostProviderEventArgs(string.Empty)))
            .Returns(Task.FromResult(true));
        }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProxyOperationManagerContainer"/> class.
 /// </summary>
 ///
 /// <param name="proxy">The proxy.</param>
 /// <param name="available">A flag indicating if the proxy is available to do work.</param>
 public ProxyOperationManagerContainer(ProxyOperationManager proxy, bool available)
 {
     this.Proxy       = proxy;
     this.IsAvailable = available;
 }