示例#1
0
    static void Configure(TransportExtensions <TestTransport> transportConfig, string brokerId)
    {
        var testRunId = TestContext.CurrentContext.Test.ID;

        string tempDir;

        if (Environment.OSVersion.Platform == PlatformID.Win32NT)
        {
            //can't use bin dir since that will be too long on the build agents
            tempDir = @"c:\temp";
        }
        else
        {
            tempDir = Path.GetTempPath();
        }

        var storageDir = Path.Combine(tempDir, testRunId, brokerId);

        transportConfig.StorageDirectory(storageDir);
        transportConfig.BrokerName(brokerId);
    }