Example #1
0
        protected TextWriterTraceListener EnableTracing()
        {
            string testName    = GetTestName() + "." + Interlocked.Increment(ref _id);
            string logBasePath = Path.Combine(Directory.GetCurrentDirectory(), "..");

            return(HostedTestFactory.EnableTracing(testName, logBasePath));
        }
Example #2
0
        protected void EnableTracing()
        {
            string testName    = GetTestName() + "." + Interlocked.Increment(ref _id);
            string logBasePath = Path.Combine(Directory.GetCurrentDirectory(), "..");

            HostedTestFactory.EnableTracing(testName, logBasePath);
        }
Example #3
0
        protected HubConnection CreateHubConnection(string url)
        {
            string testName = GetTestName() + "." + Interlocked.Increment(ref _id);
            var    query    = new Dictionary <string, string>();

            query["test"] = testName;
            var connection = new HubConnection(url, query);

            connection.TraceWriter = HostedTestFactory.CreateClientTraceWriter(testName);
            return(connection);
        }
Example #4
0
        protected HubConnection CreateHubConnection(string url)
        {
            string testName = GetTestName() + "." + Interlocked.Increment(ref _id);
            var    query    = new Dictionary <string, string>();

            query["test"] = testName;
            var connection = new HubConnection(url, query);

            connection.TransportConnectTimeout = TimeSpan.FromSeconds(10); // Adds 10 seconds to the server's connect timeout (5 seconds) for a total of 15 seconds.
            connection.TraceWriter             = HostedTestFactory.CreateClientTraceWriter(testName);
            return(connection);
        }
Example #5
0
        protected ITestHost CreateHost(HostType hostType, TransportType transportType)
        {
            string detailedTestName = GetTestName() + "." + hostType + "." + transportType + "." + Interlocked.Increment(ref _id);

            return(HostedTestFactory.CreateHost(hostType, transportType, detailedTestName));
        }
Example #6
0
 protected IClientTransport CreateTransport(TransportType transportType, IHttpClient client)
 {
     return(HostedTestFactory.CreateTransport(transportType, client));
 }