public class CalciteAssert extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
CalciteAssert.AssertMetaData
Fluent interface for building a metadata query to be tested.
|
static class |
CalciteAssert.AssertQuery
Fluent interface for building a query to be tested.
|
static class |
CalciteAssert.AssertThat
Result of calling
that(). |
static class |
CalciteAssert.Config
Connection configuration.
|
static interface |
CalciteAssert.ConnectionPostProcessor
Connection post-processor.
|
static class |
CalciteAssert.DatabaseInstance
Information necessary to create a JDBC connection.
|
static interface |
CalciteAssert.PreparedStatementConsumer
We want a consumer that can throw SqlException.
|
static class |
CalciteAssert.SchemaSpec
Specification for common test schemas.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static CalciteAssert.DatabaseInstance |
DB
Which database to use for tests that require a JDBC data source.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static org.apache.calcite.schema.SchemaPlus |
addSchema(org.apache.calcite.schema.SchemaPlus rootSchema,
CalciteAssert.SchemaSpec... schemas)
Adds a schema specification (or specifications) to the root schema,
returning the last one created.
|
static void |
assertArrayEqual(String message,
Object[] expected,
Object[] actual)
Asserts that two objects are equal.
|
static Consumer<ResultSet> |
checkMaskedResultContains(String expected) |
static Consumer<ResultSet> |
checkResultContains(String... expected) |
static Consumer<ResultSet> |
checkResultContains(String expected,
int count) |
static Consumer<ResultSet> |
checkResultCount(org.hamcrest.Matcher<Integer> expected) |
static Consumer<ResultSet> |
checkResultType(String expected) |
static Consumer<Integer> |
checkUpdateCount(int expected) |
static CalciteAssert.AssertThat |
hr()
Short-hand for
CalciteAssert.that().with(Config.REGULAR). |
static CalciteAssert.AssertThat |
model(String model)
Short-hand for
CalciteAssert.that().with(Config.EMPTY).withModel(model). |
static CalciteAssert.AssertThat |
that()
Creates an instance of
CalciteAssert with the empty
configuration. |
static CalciteAssert.AssertThat |
that(CalciteAssert.Config config)
Creates an instance of
CalciteAssert with a given
configuration. |
static String |
toString(ResultSet resultSet)
Converts a
ResultSet to a string. |
public static final CalciteAssert.DatabaseInstance DB
CalciteSystemProperty.TEST_DBpublic static CalciteAssert.AssertThat that()
CalciteAssert with the empty
configuration.public static CalciteAssert.AssertThat that(CalciteAssert.Config config)
CalciteAssert with a given
configuration.public static CalciteAssert.AssertThat model(String model)
CalciteAssert.that().with(Config.EMPTY).withModel(model).public static CalciteAssert.AssertThat hr()
CalciteAssert.that().with(Config.REGULAR).public static Consumer<ResultSet> checkResultCount(org.hamcrest.Matcher<Integer> expected)
public static Consumer<ResultSet> checkResultContains(String expected, int count)
public static Consumer<ResultSet> checkMaskedResultContains(String expected)
public static String toString(ResultSet resultSet) throws SQLException
ResultSet to a string.SQLExceptionpublic static org.apache.calcite.schema.SchemaPlus addSchema(org.apache.calcite.schema.SchemaPlus rootSchema,
CalciteAssert.SchemaSpec... schemas)
public static void assertArrayEqual(String message, Object[] expected, Object[] actual)
AssertionError is thrown with the given message. If
expected and actual are null,
they are considered equal.
This method produces more user-friendly error messages than
Assertions.assertArrayEquals(Object[], Object[], String)
message - the identifying message for the AssertionError (null
okay)expected - expected valueactual - actual valueCopyright © 2012-2023 Apache Software Foundation. All Rights Reserved.