Class CsvTest.Fluent

  • Enclosing class:
    CsvTest

    private class CsvTest.Fluent
    extends java.lang.Object
    Fluent API to perform test actions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Consumer<java.sql.ResultSet> expect  
      private java.lang.String model  
      private java.lang.String sql  
    • Constructor Summary

      Constructors 
      Constructor Description
      Fluent​(java.lang.String model, java.lang.String sql, java.util.function.Consumer<java.sql.ResultSet> expect)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) CsvTest.Fluent checking​(java.util.function.Consumer<java.sql.ResultSet> expect)
      Assigns a function to call to test whether output is correct.
      (package private) CsvTest.Fluent ok()
      Runs the test.
      (package private) CsvTest.Fluent returns​(java.lang.String... expectedLines)
      Sets the rows that are expected to be returned from the SQL query.
      (package private) CsvTest.Fluent returnsUnordered​(java.lang.String... expectedLines)
      Sets the rows that are expected to be returned from the SQL query, in no particular order.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • model

        private final java.lang.String model
      • sql

        private final java.lang.String sql
      • expect

        private final java.util.function.Consumer<java.sql.ResultSet> expect
    • Constructor Detail

      • Fluent

        Fluent​(java.lang.String model,
               java.lang.String sql,
               java.util.function.Consumer<java.sql.ResultSet> expect)
    • Method Detail

      • checking

        CsvTest.Fluent checking​(java.util.function.Consumer<java.sql.ResultSet> expect)
        Assigns a function to call to test whether output is correct.
      • returns

        CsvTest.Fluent returns​(java.lang.String... expectedLines)
        Sets the rows that are expected to be returned from the SQL query.
      • returnsUnordered

        CsvTest.Fluent returnsUnordered​(java.lang.String... expectedLines)
        Sets the rows that are expected to be returned from the SQL query, in no particular order.