Esempio n. 1
0
 protected override void BeginProcessing()
 {
     CheckCmdletParameters();
     
     var command = new TmxNewTestSuiteCommand(this);
     command.Execute();
 }
        protected override void BeginProcessing()
        {
            CheckCmdletParameters();

            var command = new TmxNewTestSuiteCommand(this);

            command.Execute();
        }
Esempio n. 3
0
        // internal static ITestSuite GetNewTestSuite(
        internal static object GetNewTestSuite(
            string name,
            string id,
            string description)
        {
            var cmdlet = new NewSuiteCmdletBase();

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

            var command = new TmxNewTestSuiteCommand(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);
        }