示例#1
0
        public TestStep Create(string command)
        {
            if (string.IsNullOrWhiteSpace(command))
            {
                return(null);
            }

            command = command.Trim();
            if (command.StartsWith("!loadAssembly"))
            {
                var step = new LoadAssemblyStep();
                step.AssemblyPath = ParseCommandParameter(command);
                return(step);
            }

            else if (command.StartsWith("!setClass"))
            {
                var step = new SetClassStep();
                step.QualifiedName = ParseCommandParameter(command);
                return(step);
            }

            else if (command.StartsWith("!testStep"))
            {
                var commandParameter = ParseCommandParameter(command);
                var step             = CreateExecuteMethodStep(commandParameter);
                return(step);
            }

            else if (command.StartsWith("#"))
            {
                var commandParameter = command.Substring(1);
                var step             = CreateExecuteMethodStep(commandParameter);
                return(step);
            }

            else
            {
                var step = new FormattingStep();
                step.FormattingText = command;
                return(step);
            }
        }
示例#2
0
 public void Visit(LoadAssemblyStep testStep)
 {
 }