Sha256: b02c9c70e0c4a81a24fc9afbf6902e58470d2e4984aba0e61dd4f97ef6df3390
Contents?: true
Size: 1.96 KB
Versions: 1
Compression:
Stored size: 1.96 KB
Contents
require "spec_helper" describe "Connection" do describe "create" do before(:each) do @olap = Mondrian::OLAP::Connection.new(CONNECTION_PARAMS_WITH_CATALOG) end it "should not be connected before connection" do @olap.should_not be_connected end it "should be successful" do @olap.connect.should be_true end end describe "create with catalog content" do before(:all) do @schema_xml = File.read(CATALOG_FILE) end it "should be successful" do @olap = Mondrian::OLAP::Connection.new(CONNECTION_PARAMS.merge( :catalog_content => @schema_xml )) @olap.connect.should be_true end end describe "properties" do before(:all) do @olap = Mondrian::OLAP::Connection.create(CONNECTION_PARAMS_WITH_CATALOG) end it "should be connected" do @olap.should be_connected end # to check that correct database dialect is loaded by ServiceDiscovery detected class loader it "should use corresponding Mondrian dialect" do # read private "schema" field schema_field = @olap.raw_schema.getClass.getDeclaredField("schema") schema_field.setAccessible(true) private_schema = schema_field.get(@olap.raw_schema) private_schema.getDialect.java_class.name.should == case MONDRIAN_DRIVER when 'mysql' then 'mondrian.spi.impl.MySqlDialect' when 'postgresql' then 'mondrian.spi.impl.PostgreSqlDialect' when 'oracle' then 'mondrian.spi.impl.OracleDialect' when 'luciddb' then 'mondrian.spi.impl.LucidDbDialect' when 'mssql' then 'mondrian.spi.impl.MicrosoftSqlServerDialect' when 'sqlserver' then 'mondrian.spi.impl.MicrosoftSqlServerDialect' end end end describe "close" do before(:all) do @olap = Mondrian::OLAP::Connection.create(CONNECTION_PARAMS_WITH_CATALOG) end it "should not be connected after close" do @olap.close @olap.should_not be_connected end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mondrian-olap-0.4.0-java | spec/connection_spec.rb |