test cases as they are returned from a test plan
This is different from TestCase as it returns additional info from the testplan. Maybe this should be refactored with a testplandetails subclass
Inheritance: TL_Data
Example #1
0
        /// <summary>
        /// This is used for the call GetTestCasesForTestPlan
        /// using the returned list from TestLink, generate a list of data
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static List <TestCaseFromTestPlan> GenerateFromResponse(XmlRpcStruct list)
        {
            List <TestCaseFromTestPlan> result = new List <TestCaseFromTestPlan>();

            if (list != null)
            {
                foreach (object o in list.Values)
                {
                    TestCaseFromTestPlan tc = null;
                    if (o is XmlRpcStruct)
                    {
                        XmlRpcStruct list2 = o as XmlRpcStruct;
                        foreach (object o2 in list2.Values)
                        {
                            tc = new TestCaseFromTestPlan(o2 as XmlRpcStruct);
                            result.Add(tc);
                        }
                    }
                    else
                    {
                        object[] olist = o as object[];
                        tc = new TestCaseFromTestPlan(olist[0] as XmlRpcStruct);
                        result.Add(tc);
                    }
                }
            }
            return(result);
        }
Example #2
0
 /// <summary>
 /// This is used for the call GetTestCasesForTestPlan
 /// using the returned list from TestLink, generate a list of data
 /// </summary>
 /// <param name="list"></param>
 /// <returns></returns>
 public static List<TestCaseFromTestPlan> GenerateFromResponse(XmlRpcStruct list)
 {
     List<TestCaseFromTestPlan> result = new List<TestCaseFromTestPlan>();
     if (list != null)
     {
         foreach (object o in list.Values)
         {
              TestCaseFromTestPlan tc = null;
              if (o is XmlRpcStruct)
              {
                  XmlRpcStruct list2 = o as XmlRpcStruct;
                  foreach (object o2 in list2.Values)
                  {
                      tc = new TestCaseFromTestPlan(o2 as XmlRpcStruct);
                      result.Add(tc);
                  }
              }
              else
              {
                  object[] olist = o as object[];
                  tc = new TestCaseFromTestPlan(olist[0] as XmlRpcStruct);
                  result.Add(tc);
              }
         }
     }
     return result;
 }