Class SqlTest.Fluent

  • Enclosing class:
    SqlTest

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

      Fields 
      Modifier and Type Field Description
      private java.util.function.Function<java.sql.ResultSet,​java.lang.Void> 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.Function<java.sql.ResultSet,​java.lang.Void> expect)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) SqlTest.Fluent checking​(java.util.function.Function<java.sql.ResultSet,​java.lang.Void> expect)
      Assigns a function to call to test whether output is correct.
      (package private) SqlTest.Fluent ok()
      Runs the test.
      (package private) SqlTest.Fluent returns​(java.lang.String... expectedLines)
      Sets the rows that are expected to be returned from the SQL query.
      (package private) SqlTest.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.Function<java.sql.ResultSet,​java.lang.Void> expect
    • Constructor Detail

      • Fluent

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

      • checking

        SqlTest.Fluent checking​(java.util.function.Function<java.sql.ResultSet,​java.lang.Void> expect)
        Assigns a function to call to test whether output is correct.
      • returns

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

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