GetTestCaseIDByName() public method

get a list of test case ids with this name.
public GetTestCaseIDByName ( string testcasename ) : List
testcasename string name of the test case (case sensitive)
return List
Example #1
0
        /// <summary>
        /// get the test case by this name in this particular test suite
        /// </summary>
        /// <param name="testCaseName"></param>
        /// <param name="testSuiteId">the test suite the test case has to be in</param>
        /// <returns>a valid test case id or 0 if no test case was found</returns>
        private int getTestCaseByName(string testName, int testSuiteId)
        {
            List <TestCaseId> idList = proxy.GetTestCaseIDByName(testName);

            if (idList.Count == 0)
            {
                return(0);
            }
            foreach (TestCaseId tc in idList)
            {
                if (tc.parent_id == testSuiteId)
                {
                    return(tc.id);
                }
            }
            return(0);
        }
Example #2
0
 public void shouldFailBecauseOfNullDevKey()
 {
     proxy = new TestLink(null, targetDBUrl);
     List<TestCaseId> tcidList = proxy.GetTestCaseIDByName("10 G shock");
     string result = proxy.SayHello();
     Assert.AreNotEqual("Hello!", result, "Unexpected Server Response");
     Assert.Fail("Did not cause an exception");
 }