Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 public void Visit(FormattingStep testStep)
 {
 }