internal static ITestScenario AddTestScenario( ITestSuite testSuite, string name, string id, string description, string testSuiteName, string testSuiteId) { AddTMXTestScenarioCommand cmdlet = new AddTMXTestScenarioCommand(); //cmdlet.UnitTestMode = true; if (null != name && string.Empty != name) { cmdlet.Name = name; } if (null != id && string.Empty != id) { cmdlet.Id = id; } if (null != description && string.Empty != description) { cmdlet.Description = description; } if (null == testSuite) { if (null != testSuiteName && string.Empty != testSuiteName) { cmdlet.TestSuiteName = testSuiteName; } if (null != testSuiteId && string.Empty != testSuiteId) { cmdlet.TestSuiteId = testSuiteId; } if ((null == testSuiteName || string.Empty == testSuiteName) && (null == testSuiteId || string.Empty == testSuiteId)) { cmdlet.InputObject = TestData.CurrentTestSuite; } } else { cmdlet.InputObject = (TestSuite)testSuite; } TMXAddTestScenarioCommand command = new TMXAddTestScenarioCommand(cmdlet); command.Execute(); return((ITestScenario)TMX.TestData.CurrentTestScenario); }
/// <summary> /// Processes the pipeline. /// </summary> protected override void ProcessRecord() { TMXAddTestScenarioCommand command = new TMXAddTestScenarioCommand(this); command.Execute(); }