Package fit

Examples of fit.Parse.addToBody()


    }

    public void exception(Throwable e)
    {
      Parse cell = cells.get(0);
      cell.addToBody("<hr/>" + label(e.toString()));
      cell.addToTag(" class=\"error\"");
    }

    public void right(int col)
    {
View Full Code Here


          + " requires an argument");
    }
    String cmdString = args.text();
    connector = factory.createMongoSourceTargetConnector(cmdString);
    cmdString = parameters.replaceValuesIn(cmdString);
    args.addToBody("<hr/>" + label("Substituted Output") + "<hr/>");
    args.addToBody("<pre/>" + cmdString + "</pre>");
  }

  @Override
  protected final void tearDown() throws Exception {
View Full Code Here

    }
    String cmdString = args.text();
    connector = factory.createMongoSourceTargetConnector(cmdString);
    cmdString = parameters.replaceValuesIn(cmdString);
    args.addToBody("<hr/>" + label("Substituted Output") + "<hr/>");
    args.addToBody("<pre/>" + cmdString + "</pre>");
  }

  @Override
  protected final void tearDown() throws Exception {
    connector.close();
View Full Code Here

      throw new MissingCellsFailureException(cells.text()
          + " requires an argument");
    }
    String consoleStream = stream.text();
    if (STDOUT.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Output") + "<hr/>");
      stream.addToBody("<pre/>" + out.toString() + "</pre>");
    } else if (STDERR.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Error") + "<hr/>");
      stream.addToBody("<pre/>" + err.toString() + "</pre>");
    } else {
View Full Code Here

          + " requires an argument");
    }
    String consoleStream = stream.text();
    if (STDOUT.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Output") + "<hr/>");
      stream.addToBody("<pre/>" + out.toString() + "</pre>");
    } else if (STDERR.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Error") + "<hr/>");
      stream.addToBody("<pre/>" + err.toString() + "</pre>");
    } else {
      throw new FitFailureException("Don't know how to process "
View Full Code Here

    String consoleStream = stream.text();
    if (STDOUT.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Output") + "<hr/>");
      stream.addToBody("<pre/>" + out.toString() + "</pre>");
    } else if (STDERR.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Error") + "<hr/>");
      stream.addToBody("<pre/>" + err.toString() + "</pre>");
    } else {
      throw new FitFailureException("Don't know how to process "
          + consoleStream
          + ", valid values are: <pre>stdout, stderr</pre>");
View Full Code Here

    if (STDOUT.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Output") + "<hr/>");
      stream.addToBody("<pre/>" + out.toString() + "</pre>");
    } else if (STDERR.equalsIgnoreCase(consoleStream)) {
      stream.addToBody("<hr/>" + label("Console Error") + "<hr/>");
      stream.addToBody("<pre/>" + err.toString() + "</pre>");
    } else {
      throw new FitFailureException("Don't know how to process "
          + consoleStream
          + ", valid values are: <pre>stdout, stderr</pre>");
    }
View Full Code Here

    Parse errorCell = new Parse("td", "", null, null);
    final StringWriter buffer = new StringWriter();

    e.printStackTrace(new PrintWriter(buffer));
    errorCell.addToTag(" colspan=\"" + (columnBindings.length + 1) + "\"");
    errorCell.addToBody("<i>" + ERROR_INDICATOR + e.getMessage() + "</i>");
    errorCell.addToBody("<pre>" + (buffer.toString()) + "</pre>");
    wrong(errorCell);

    return errorCell;
  }
View Full Code Here

    final StringWriter buffer = new StringWriter();

    e.printStackTrace(new PrintWriter(buffer));
    errorCell.addToTag(" colspan=\"" + (columnBindings.length + 1) + "\"");
    errorCell.addToBody("<i>" + ERROR_INDICATOR + e.getMessage() + "</i>");
    errorCell.addToBody("<pre>" + (buffer.toString()) + "</pre>");
    wrong(errorCell);

    return errorCell;
  }
View Full Code Here

    lastRow = newRow;
    try {
      Parse firstCell = new Parse("td", dr.getStringValue(columnNames[0]), null, null);
      newRow.parts = firstCell;
      if (markAsError) {
        firstCell.addToBody(Fixture.gray(desc));
        wrong(firstCell);
      }
      for (int i = 1; i < columnNames.length; i++) {
        Parse nextCell = new Parse("td", dr.getStringValue(columnNames[i]), null, null);
        firstCell.more = nextCell;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.