예제 #1
0
 //RB: This function below fill the result one by one and add comments but it is consuming too much of API
 public static void FillTheResult(JArray getRun, Dictionary <string, Tuple <int, string> > dict)
 {
     foreach (var item in getRun.Children())
     {
         // This is a way to grab title (test name) and the id
         var obj   = JObject.Parse(item.ToString());
         var title = (string)obj.SelectToken("title");
         var id    = (string)obj.SelectToken("id");
         if (dict.ContainsKey(title))
         {
             var tupleStatusComment = dict[title];
             TestExporter.Result("add_result/" + id, tupleStatusComment.Item1, tupleStatusComment.Item2);
         }
     }
 }