public TestStateUpdater(TestRunClient client, IDevOpsServerHandle devOpsServerHandle, string productLineKey, BuildInfo build, ILogger logger = null)
 {
     _client             = client;
     _devOpsServerHandle = devOpsServerHandle;
     _productLineKey     = productLineKey;
     _build       = build;
     _logger      = logger ?? new NullLogger();
     _productLine = new ProductLine()
     {
         Key = _productLineKey,
         AzureProductBuildDefinitionId = _build.AzureBuildDefinitionId
     };
 }
 private TestRunSessionAgent(
     TestRunClient client,
     ITestRunClientConfiguration configuration,
     TestRunSessionResponse session,
     ProductLine productLine,
     ILogger logger)
 {
     _client        = client;
     _configuration = configuration;
     _session       = session;
     _productLine   = productLine;
     _project       = session.ProductBuild.TeamProject;
     _logger        = logger;
 }
        public static async Task <TestRunSessionAgent> CreateAsync(
            ITestRunClientConfiguration configuration,
            TestRunSessionRequest sessionRequest,
            ILogger logger = null)
        {
            logger = logger ?? new NullLogger();
            var client = new TestRunClient(configuration.TestRunServiceUrl);

            logger.Info("'TestRunClient' created.");

            var response = await client.InsertSessionAsync(sessionRequest);

            var productLine = response.ProductLine;

            logger.Debug("'TestRunSession' inserted: " + ObjToString(response));

            return(new TestRunSessionAgent(client, configuration, response, productLine, logger));
        }