Package gherkin.formatter

Examples of gherkin.formatter.Formatter


    }

    public String transform(String storyAsText) {
      final StringBuffer out = new StringBuffer();

      Formatter formatter = new Formatter(){
        public void uri(String uri) {
          out.append(uri).append("\n");
        }

        public void feature(Feature feature) {
View Full Code Here


                super.runAfterHooks(reporter, tags);
                EventHelper.fire(new AfterAfterHooks());
            }
        };

        final Formatter formatter = runtimeOptions.formatter(tccl);
        final JUnitReporter jUnitReporter = new JUnitReporter(runtimeOptions.reporter(tccl), formatter, runtimeOptions.isStrict());
        for (final CucumberFeature feature : cucumberFeatures) {
            LOGGER.info("Running " + feature.getPath());
            new FeatureRunner(feature, runtime, jUnitReporter).run(runNotifier);
        }
View Full Code Here

    private Parser parser;
    private final Writer out;

    public Main(final Writer out) {
        this.out = out;
        final Formatter formatter = new PrettyFormatter(out, false, true);
        parser = new Parser(formatter);
    }
View Full Code Here

  public void format() throws UnsupportedEncodingException {
    String gherkin = GherkinTestFixtures.unformatted_feature;

    ByteArrayOutputStream output = new ByteArrayOutputStream();
    PrintWriter out = new PrintWriter(output);
    Formatter formatter = new PrettyFormatter(out, true, false);

    Parser parser = new Parser(formatter);
    parser.parse(gherkin, "", 0);

    out.flush();
View Full Code Here

  public static String format(String contents) {
    // set up
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    PrintWriter out = new PrintWriter(output);
    Formatter formatter = new PrettyFormatter(out, true, false);

    // parse
    new Parser(formatter).parse(contents, "", 0);

    out.flush();
View Full Code Here

   * initialReconcile()
   */
  @Override
  public void initialReconcile() {
    final List<Position> ranges = new ArrayList<Position>();
    Parser p = new Parser(new Formatter() {

      private Stack<PositionedElement> stack = new Stack<PositionedElement>();

      @Override
      public void uri(String arg0) {
View Full Code Here

TOP

Related Classes of gherkin.formatter.Formatter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.