Package org.apache.calcite.test
Class CalciteAssert
java.lang.Object
org.apache.calcite.test.CalciteAssert
Fluid DSL for testing Calcite connections and queries.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classFluent interface for building a metadata query to be tested.static classFluent interface for building a query to be tested.static classResult of callingthat().static enumConnection configuration.static interfaceConnection post-processor.static enumInformation necessary to create a JDBC connection.static interfaceWe want a consumer that can throw SqlException.static enumSpecification for common test schemas.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final CalciteAssert.DatabaseInstanceWhich database to use for tests that require a JDBC data source.
- 
Method SummaryModifier and TypeMethodDescriptionstatic SchemaPlusaddSchema(SchemaPlus rootSchema, CalciteAssert.SchemaSpec... schemas) Adds a schema specification (or specifications) to the root schema, returning the last one created.static voidassertArrayEqual(String message, Object[] expected, Object[] actual) Asserts that two objects are equal.checkMaskedResultContains(String expected) checkResultContains(String... expected) checkResultContains(String expected, int count) checkResultCount(org.hamcrest.Matcher<Integer> expected) checkResultType(String expected) checkUpdateCount(int expected) static CalciteAssert.AssertThathr()Short-hand forCalciteAssert.that().with(Config.REGULAR).static CalciteAssert.AssertThatShort-hand forCalciteAssert.that().with(Config.EMPTY).withModel(model).static CalciteAssert.AssertThatthat()Creates an instance ofCalciteAssertwith the empty configuration.static CalciteAssert.AssertThatthat(CalciteAssert.Config config) Creates an instance ofCalciteAssertwith a given configuration.static StringConverts aResultSetto a string.
- 
Field Details- 
DBWhich database to use for tests that require a JDBC data source.- See Also:
 
 
- 
- 
Method Details- 
thatCreates an instance ofCalciteAssertwith the empty configuration.
- 
thatCreates an instance ofCalciteAssertwith a given configuration.
- 
modelShort-hand forCalciteAssert.that().with(Config.EMPTY).withModel(model).
- 
hrShort-hand forCalciteAssert.that().with(Config.REGULAR).
- 
checkResultCount
- 
checkUpdateCount
- 
checkResultContains
- 
checkResultContains
- 
checkMaskedResultContains
- 
checkResultType
- 
toStringConverts aResultSetto a string.- Throws:
- SQLException
 
- 
addSchemaAdds a schema specification (or specifications) to the root schema, returning the last one created.
- 
assertArrayEqualAsserts that two objects are equal. If they are not, anAssertionErroris thrown with the given message. Ifexpectedandactualarenull, they are considered equal.This method produces more user-friendly error messages than Assertions.assertArrayEquals(Object[], Object[], String)- Parameters:
- message- the identifying message for the- AssertionError(- nullokay)
- expected- expected value
- actual- actual value
 
 
-