Hamcrest Result Set Matcher.

Build Status Maven Central – Matcher for SQL Result Sets

Quality Gate Status

Security Rating Reliability Rating Maintainability Rating Technical Debt

Code Smells Coverage Duplicated Lines (%) Lines of Code

Overview

This project provides Hamcrest matcher that compares JDBC result set (java.sql.ResultSet) against each other or against Java structures.

In a Nutshell

import static com.exasol.matcher.ResultSetStructurMatcher.*;

class MyTest {
    @Test
    void testCustomerTableContents() {
        // Preparation: Create a JDBC statement and store the reference in variable 'statement'
        final ResulSet result = statement.executeQuery("SELECT * FROM CUSTOMERS");
        assertThat(result, table("INTEGER", "VARCHAR", "VARCHAR")
                .row(1, "JOHN", "DOE")
                .row(2, "JANE", "SMITH")
                .matches());
    }
}

Features

  • Match two JDBC result sets
  • Match a JDBC result set against an object structure

Customer Support

This is an open source project which is written by enthusiasts at Exasol and not officially supported. We will still try to help you as much as possible. So please create GitHub issue tickets when you want to request features or report bugs.

Table of Contents

Information for Users