Meyn.TestLink.TestLink.getTestPlanByName C# (CSharp) Method

getTestPlanByName() public method

get a test plan for a project
public getTestPlanByName ( string projectname, string planName ) : TestPlan
projectname string the name of the owning project
planName string
return TestPlan
        public TestPlan getTestPlanByName(string projectname, string planName)
        {
            stateIsValid();
            object response = proxy.getTestPlanByName(devkey, projectname, planName);
            handleErrorMessage(response);
            object[] oList = response as object[];
            if (oList.Length == 1) {
                XmlRpcStruct data = (XmlRpcStruct)oList[0];
                if (data.ContainsKey("code")) {
                    throw new TestLinkException("Testlink returned an error (code={0}, msg= {1})", data["code"], data["message"]);
                }
                TestPlan result = new TestPlan(data);
                return result;
            }
            return null;
        }