use of mondrian.olap.Connection in project mondrian by pentaho.
the class DynamicSchemaProcessorTest method testDBInfoDSP.
/**
* Tests to ensure we have access to Connect properies in a DSP
*/
public void testDBInfoDSP() {
Connection monConnection = TestContext.instance().withSchemaProcessor(FoodMartCatalogDsp.class).getConnection();
assertEquals(monConnection.getSchema().getName(), "FoodmartFoundInCatalogProperty");
}
use of mondrian.olap.Connection in project mondrian by pentaho.
the class DynamicSchemaProcessorTest method testFoodmartDsp.
/**
* Tests to make sure that our base DynamicSchemaProcessor works, and
* Mondrian is able to parse and connect to FoodMart with it
*/
public void testFoodmartDsp() {
final Connection monConnection = TestContext.instance().withSchemaProcessor(BaseDsp.class).getConnection();
assertEquals(monConnection.getSchema().getName(), "REPLACEME");
}
use of mondrian.olap.Connection in project mondrian by pentaho.
the class DynamicSchemaProcessorTest method testCheckJdbcPropertyDsp.
/**
* Tests to ensure we have access to Connect properties in a DSP
*/
public void testCheckJdbcPropertyDsp() {
Connection monConnection = TestContext.instance().withSchemaProcessor(CheckJdbcPropertyDsp.class).getConnection();
assertEquals(monConnection.getSchema().getName(), CheckJdbcPropertyDsp.RETURNTRUESTRING);
}
use of mondrian.olap.Connection in project mondrian by pentaho.
the class DynamicSchemaProcessorTest method testProviderTestDSP.
/**
* Tests to ensure we have access to Connect properies in a DSP
*/
public void testProviderTestDSP() {
Connection monConnection = TestContext.instance().withSchemaProcessor(ProviderTestDSP.class).getConnection();
assertEquals(monConnection.getSchema().getName(), "mondrian");
}
use of mondrian.olap.Connection in project mondrian by pentaho.
the class SchemaVersionTest method testSchema4noVersion.
public void testSchema4noVersion() {
TestContext testContext = TestContext.instance().withSchema(SCHEMA_4_NVHEADER + SCHEMA_4_BODY);
Util.PropertyList connectInfo = testContext.getConnectionProperties();
try {
Connection conn = DriverManager.getConnection(connectInfo, null);
conn.close();
Assert.fail("No exception thrown for version 4 schema.");
} catch (MondrianException e) {
assertTrue(e.getMessage().contains("Schema version"));
}
}
Aggregations