protected override void BeginProcessing() { this.CheckCmdletParameters(); TMXCloseTestResultCommand command = new TMXCloseTestResultCommand(this); command.Execute(); }
// more parameters! internal static ITestResult CloseTestResult(TestResultStatuses codeStatus, bool logicStatus) { GetNewTestSuite("name", "id", "description"); CloseTMXTestResultCommand cmdlet = new CloseTMXTestResultCommand(); cmdlet.TestResultName = "test result"; switch (codeStatus) { case TestResultStatuses.Passed: cmdlet.TestPassed = true; break; case TestResultStatuses.Failed: cmdlet.TestPassed = false; break; case TestResultStatuses.NotTested: // nothing to do break; // case TestResultStatuses.KnownIssue: // cmdlet.KnownIssue = true; // break; default: //throw new Exception("Invalid value for TestResultStatuses"); //nothing to do break; } cmdlet.KnownIssue = logicStatus; TMXCloseTestResultCommand command = new TMXCloseTestResultCommand(cmdlet); command.Execute(); return(TMX.TestData.CurrentTestResult); }