Interface ConnectorOutputTest.TestData

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void close()
      If records are being recorded, then complete writing them and close all resources associated with the test data.
      Iterator<Document> read()
      Read the records that are expected by the test.
      default void write​(Document sourceRecord)
      Record the function that should be called with each of the actual records output by the connector.
    • Method Detail

      • read

        Iterator<Document> read()
                         throws IOException
        Read the records that are expected by the test.
        Returns:
        the expected records, or null if there are none
        Throws:
        IOException - if there is a problem reading the expected records
      • write

        default void write​(Document sourceRecord)
        Record the function that should be called with each of the actual records output by the connector. By default this method does nothing.
        Parameters:
        sourceRecord - the JSON representation of the source record; never null
      • close

        default void close()
                    throws IOException
        If records are being recorded, then complete writing them and close all resources associated with the test data. By default this method does nothing.
        Specified by:
        close in interface AutoCloseable
        Throws:
        IOException - if there is a problem writing the expected records