Class MessagesToSummaryWriter

  • All Implemented Interfaces:
    AutoCloseable

    public final class MessagesToSummaryWriter
    extends Object
    implements AutoCloseable
    Writes the summary output of a test run.

    Note: Messages are first collected and only written once the stream is closed.

    • Method Detail

      • write

        public void write​(io.cucumber.messages.types.Envelope envelope)
                   throws IOException
        Writes a cucumber message to the pretty output.
        Parameters:
        envelope - the message
        Throws:
        IOException - if an IO error occurs
      • close

        public void close()
        Closes the stream, flushing it first. Once closed further write() invocations will cause an IOException to be thrown. Closing a closed stream has no effect.
        Specified by:
        close in interface AutoCloseable