Description of TmxCloseTestResultCommand.
Inheritance: TmxCommand
Ejemplo n.º 1
0
 protected override void BeginProcessing()
 {
     CheckCmdletParameters();
         
     var command = new TmxCloseTestResultCommand(this);
     command.Execute();
 }
Ejemplo n.º 2
0
        // more parameters!
        internal static ITestResult CloseTestResult(TestStatuses codeStatus, bool logicStatus)
        {
            GetNewTestSuite("name", "id", "description");
            var cmdlet = new CloseTmxTestResultCommand();
            cmdlet.TestResultName = "test result";

            switch (codeStatus) {
                case TestStatuses.Passed:
                    cmdlet.TestPassed = true;
                    // 20140715
                    // cmdlet.TestResultStatus = TestResultStatuses.Passed;
                    break;
                case TestStatuses.Failed:
                    cmdlet.TestPassed = false;
                    // 20140715
                    // cmdlet.TestResultStatus = TestResultStatuses.Failed;
                    break;
                case TestStatuses.NotRun:
                    // nothing to do
                    break;
//                case TestResultStatuses.KnownIssue:
//                    cmdlet.KnownIssue = true;
//                    break;
                default:
                    //nothing to do
                    break;
            }

            cmdlet.KnownIssue = logicStatus;
            // 20140715
            // if (logicStatus)
            //     cmdlet.TestResultStatus = TestResultStatuses.KnownIssue;
            
            var command = new TmxCloseTestResultCommand(cmdlet);
            command.Execute();

            return TestData.CurrentTestResult;
        }