smeyn / gallio-testlink-adapter

Moved From Google Code
3 stars 9 forks source link

GetProjectTestPlans throws exception casting XmlRpcStruct[] #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. call the method with valid input

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
Suggested code amendment below;

        public List<TestPlan> GetProjectTestPlans(int projectid)
        {
            object response = proxy.getProjectTestPlans(devkey, projectid);
            List<TestPlan> retval = new List<TestPlan>();
            if ((response is string) && ((string)response == string.Empty))
 // equals null return
                return retval;
            object[] list = response as object[];
            handleErrorMessage(list);
            if ((list.Length == 0) || (list[0] is string))
                return retval;
            foreach (XmlRpcStruct data in list)
            {
                TestPlan tp = new TestPlan(data);
                retval.Add(tp);
            }
            return retval;
        }

Original issue reported on code.google.com by stuart.j...@gmail.com on 30 Mar 2010 at 10:47

GoogleCodeExporter commented 9 years ago
THanks. I will incorporate the changes.

Original comment by StephanMeyn on 7 Apr 2010 at 3:36

GoogleCodeExporter commented 9 years ago
Fixed in version 1.3a

Original comment by StephanMeyn on 18 May 2012 at 1:21