public static TestRun CreateTestRun(TestRun testRun)
 {
     try
     {
         var createdTestRun = CltHttpClientWrapper.Post <TestRun>("/_apis/clt/testruns", GetStringContentForObject(testRun)).Result;
         return(createdTestRun);
     }
     catch (AggregateException aggregateException)
     {
         Exception innerException   = aggregateException.InnerException;
         string    exceptionMessage = "CreateTestRun failed with the following error";
         while (innerException != null)
         {
             exceptionMessage = exceptionMessage + "\n\t" + innerException.Message;
             innerException   = innerException.InnerException;
         }
         throw new Exception(exceptionMessage);
     }
 }
 public static CounterSamplesResult GetTestRunCounterSamples(string testRunId, GenericListStructure <CounterSampleQueryDetails> queryDetails)
 {
     try
     {
         return
             (CltHttpClientWrapper.Post <CounterSamplesResult>("/_apis/clt/testruns/" + testRunId +
                                                               "/counterSamples", GetStringContentForObject(queryDetails)).Result);
     }
     catch (AggregateException aggregateException)
     {
         Exception innerException   = aggregateException.InnerException;
         string    exceptionMessage = "getting test run samples failed with the following error";
         while (innerException != null)
         {
             exceptionMessage = exceptionMessage + "\n\t" + innerException.Message;
             innerException   = innerException.InnerException;
         }
         throw new Exception(exceptionMessage);
     }
 }
 public static TestDrop CreateTestDrop()
 {
     try
     {
         var testDrop = new TestDrop()
         {
             DropType = TestDropType
         };
         return(CltHttpClientWrapper.Post <TestDrop>("/_apis/clt/testdrops", GetStringContentForObject(testDrop)).Result);
     }
     catch (AggregateException aggregateException)
     {
         Exception innerException   = aggregateException.InnerException;
         string    exceptionMessage = "Test Drop Creation failed with the following error";
         while (innerException != null)
         {
             exceptionMessage = exceptionMessage + "\n\t" + innerException.Message;
             innerException   = innerException.InnerException;
         }
         throw new Exception(exceptionMessage);
     }
 }