public static void GetTestSuiteFromTestSuite(TLTestSuiteCmdletBase cmdlet, TestSuite[] testSuites) { string testSuiteNameNow = string.Empty; try { foreach (TestSuite testSuite in testSuites) { testSuiteNameNow = testSuite.name; cmdlet.WriteVerbose( cmdlet, "getting suites from the test suite '" + testSuiteNameNow + "'."); System.Collections.Generic.List <TestSuite> list = TLAddinData.CurrentTestLinkConnection.GetTestSuitesForTestSuite(testSuite.id); cmdlet.WriteVerbose(cmdlet, "There have been found " + list.Count.ToString() + " test suites."); foreach (TestSuite testSuiteFound in list) { TLAddinData.CurrentTestSuite = testSuiteFound; } cmdlet.WriteObject(cmdlet, list); } } catch (Exception eTestSuite) { cmdlet.WriteError( cmdlet, "Failed to get suites from the test suite '" + testSuiteNameNow + "'. " + eTestSuite.Message, "FailedToGetSuites", ErrorCategory.InvalidResult, true); } }
public static void GetTestSuiteFromTestSuite(TLTestSuiteCmdletBase cmdlet, Meyn.TestLink.TestSuite[] testSuites) { string testSuiteNameNow = string.Empty; try { foreach (Meyn.TestLink.TestSuite testSuite in testSuites) { testSuiteNameNow = testSuite.name; cmdlet.WriteVerbose( cmdlet, "getting suites from the test suite '" + testSuiteNameNow + "'."); System.Collections.Generic.List<Meyn.TestLink.TestSuite> list = TLAddinData.CurrentTestLinkConnection.GetTestSuitesForTestSuite(testSuite.id); cmdlet.WriteVerbose(cmdlet, "There have been found " + list.Count.ToString() + " test suites."); foreach (Meyn.TestLink.TestSuite testSuiteFound in list) { TLAddinData.CurrentTestSuite = testSuiteFound; } cmdlet.WriteObject(cmdlet, list); } } catch (Exception eTestSuite) { cmdlet.WriteError( cmdlet, "Failed to get suites from the test suite '" + testSuiteNameNow + "'. " + eTestSuite.Message, "FailedToGetSuites", ErrorCategory.InvalidResult, true); } }