Class MessagesToHtmlWriter.Builder

java.lang.Object
io.cucumber.htmlformatter.MessagesToHtmlWriter.Builder
Enclosing class:
MessagesToHtmlWriter

public static final class MessagesToHtmlWriter.Builder extends Object
  • Method Details

    • title

      public MessagesToHtmlWriter.Builder title(String title)
      Sets a custom title for the report, default value "Cucumber".
      Parameters:
      title - the custom title.
      Returns:
      this builder
    • icon

      Sets a custom icon for the report, default value the cucumber logo.

      The icon is any valid href value.

      Parameters:
      icon - a supplier for the custom icon.
      Returns:
      this builder
    • icon

      Sets a custom icon for the report, default value the cucumber logo.

      The icon is any valid href value.

      Parameters:
      icon - the custom icon.
      Returns:
      this builder
    • css

      Sets default css for the report.

      The default script styles the cucumber report. Unless you are building your own html report you should use customCss(Supplier) instead.

      Parameters:
      css - a supplier for the default css.
      Returns:
      this builder
    • customCss

      public MessagesToHtmlWriter.Builder customCss(Supplier<InputStream> customCss)
      Sets custom css for the report.

      The custom css is applied after the default css.

      Parameters:
      customCss - a supplier for the custom css.
      Returns:
      this builder
      See Also:
    • script

      Replaces default script for the report.

      The default script renders the cucumber messages into a report. Unless you are building yourMessagesToHtmlWriter own html report you should use customScript(Supplier) instead.

      Parameters:
      script - a supplier for the default script.
      Returns:
      this builder
    • customScript

      public MessagesToHtmlWriter.Builder customScript(Supplier<InputStream> customScript)
      Sets custom script for the report.

      The custom script is applied after the default script.

      Parameters:
      customScript - a supplier for the custom script.
      Returns:
      this builder
    • build

      public MessagesToHtmlWriter build(OutputStream out)
      Create an instance of the messages to html writer.
      Parameters:
      out - the output stream to write to
      Returns:
      a new instance of the messages to html writer.