Beispiel #1
0
        public void Scenario(string scenario, string title, int line)
        {
            tableAction();
            var lineInFile = new LineInFile(line);

            listener.Scenario(new Token(scenario.Trim(), lineInFile), new Token(title, lineInFile));
        }
Beispiel #2
0
        public void Step(string step, string stepText, int line)
        {
            tableAction();
            var position = new LineInFile(line);

            listener.Step(new Token(step.Trim(), position), new Token(stepText, position));
        }
Beispiel #3
0
        public void DocString(string str, int line)
        {
            tableAction();
            var position = new LineInFile(line);

            listener.DocString(new Token(str.Trim(), position));
        }
Beispiel #4
0
        public void Examples(string examples, string str2, int line)
        {
            tableAction();
            table = new List <IList <Token> >();
            var position = new LineInFile(line);

            listener.Examples(new Token(examples.Trim(), position), new Token(str2, position));
        }
Beispiel #5
0
        public void Feature(string feature, string title, string narrative, int line)
        {
            tableAction();
            var lineInFile = new LineInFile(line);

            if (Environment.NewLine == "\r\n")
            {
                narrative = narrative.Replace("\r", "").Replace("\n", Environment.NewLine);
            }
            listener.Feature(new Token(feature.Trim(), lineInFile), new Token(title, lineInFile), new Token(narrative, lineInFile));
        }
Beispiel #6
0
        public void Row(List <string> l, int line)
        {
            if (table.Any() == false)
            {
                tableAction = () => ParsedTable(new LineInFile(line));
            }

            var columns    = l.ToArray();
            var lineInFile = new LineInFile(line);
            var cols       = columns.Select(_ => new Token(_, lineInFile)).ToList();

            table.Add(cols);
        }
Beispiel #7
0
        public void Background(string background, string title, int line)
        {
            var lineInFile = new LineInFile(line);

            listener.Background(new Token(background.Trim(), lineInFile), new Token(title, lineInFile));
        }
Beispiel #8
0
 private void ParsedTable(LineInFile position)
 {
     listener.Table(table, position);
     tableAction = () => { };
     table       = new List <IList <Token> >();
 }