Interface WriterDelegateTests

    • Method Detail

      • wrapWriter

        Writer wrapWriter​(Writer delegate)
        Creates the writer to test.

        This method will be called only once for each test. This makes it possible to capture the writer to test and its delegate, and perform additional tests after the pre-defined test has finished.

        Parameters:
        delegate - The delegate to test against.
        Returns:
        The created writer.
      • expectedContent

        String expectedContent​(String written)
        Returns the expected content written to a delegate, based on the content that was written to a created writer.
        Parameters:
        written - The content that was written.
        Returns:
        The expected content.
      • contentToWrite

        default String contentToWrite()
        Returns the content to write for most tests. This default implementation returns a lorem ipsum text.
        Returns:
        The content to write.
      • longContentToWrite

        default String longContentToWrite()
        Returns the content to write when testing writing large pieces of text. this default implementation returns contentToWrite() concatenated 1000 times.
        Returns:
        The content to write when testing writing large pieces of text.