Beispiel #1
0
 public void shouldProvideArgumentsForOutlineTokens()
 {
     Step step = new Step(new List<Comment>(), "Given ", "I have <number> cukes in <whose> belly", 10, null, null);
     Assert.AreEqual(7, step.getOutlineArgs()[0].getOffset());
     Assert.AreEqual("<number>", step.getOutlineArgs()[0].getVal());
     Assert.AreEqual(25, step.getOutlineArgs()[1].getOffset());
     Assert.AreEqual("<whose>", step.getOutlineArgs()[1].getVal());
 }
 public void prints_table()
 {
     PrettyFormatter f = new PrettyFormatter(Console.Out, false, false);
     f.scenario(new Scenario(NO_COMMENTS, new List<Tag>(), "Scenario", "a scenario", "", 1, "a-scenario"));
     List<DataTableRow> rows = new List<DataTableRow>() {
         new DataTableRow(NO_COMMENTS, new List<string> { "un", "deux" }, 1, Row.DiffType.NONE),
         new DataTableRow(NO_COMMENTS, new List<string> {"one", "two" }, 1, Row.DiffType.DELETE),
         new DataTableRow(NO_COMMENTS, new List<string> {"en", "to" }, 1, Row.DiffType.INSERT),
     };
     Step step = new Step(new List<Comment>(), "Given ", "I have 6 cukes", 1, rows, null);
     f.step(step);
     Thread.Sleep(1000);
     f.match(new Match(new List<Argument> { new Argument(7, "6") }, "somewhere.brainfuck"));
     Thread.Sleep(1000);
     f.result(new Result("failed", 55L, "Something\nbad\nhappened"));
 }
 public void step(Step step)
 {
     throw new NotImplementedException();
 }
 public void step(Step step)
 {
     _steps.Add(step);
 }