protected override void BeginProcessing()
 {
     CheckCmdletParameters();
     
     var command = new TmxOpenTestSuiteCommand(this);
     command.Execute();
 }
Esempio n. 2
0
        // internal static ITestSuite GetExistingTestSuite(
        internal static object GetExistingTestSuite(
            string name,
            string id)
        {
            var cmdlet = new OpenSuiteCmdletBase();

            if (!string.IsNullOrEmpty(name))
            {
                cmdlet.Name = name;
            }
            if (!string.IsNullOrEmpty(id))
            {
                cmdlet.Id = id;
            }

            var command = new TmxOpenTestSuiteCommand(cmdlet);

            command.Execute();

            // 20140715
            // return (ITestSuite)(object)UnitTestOutput.LastOutput[0];
            var returnValue = (object)UnitTestOutput.LastOutput[0];

            if (returnValue is ITestSuite)
            {
                return(returnValue as ITestSuite);
            }
            if (returnValue is ErrorRecord)
            {
                return(returnValue as ErrorRecord);
            }
            return(returnValue);
        }
        protected override void BeginProcessing()
        {
            CheckCmdletParameters();

            var command = new TmxOpenTestSuiteCommand(this);

            command.Execute();
        }