Package mondrian.test

Class Olap4jTest


  • public class Olap4jTest
    extends FoodMartTestCase
    Tests mondrian's olap4j API.

    Test cases in this test could, in principle, be moved to olap4j's test.

    Author:
    jhyde
    • Constructor Detail

      • Olap4jTest

        public Olap4jTest()
      • Olap4jTest

        public Olap4jTest​(java.lang.String name)
    • Method Detail

      • testAnnotation

        public void testAnnotation()
                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • testFormatString

        public void testFormatString()
                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • testLevelProperties

        public void testLevelProperties()
                                 throws java.sql.SQLException
        Tests that a property that is not a standard olap4j property but is a Mondrian-builtin property (viz, "FORMAT_EXP") is included among a level's properties.
        Throws:
        java.sql.SQLException - on error
      • testCellProperties

        public void testCellProperties()
                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • testLimit

        public void testLimit()
                       throws java.sql.SQLException
        Same case as BasicQueryTest.testQueryIterationLimit(), but this time, check that the OlapException has the required SQLstate.
        Throws:
        java.sql.SQLException - on error
      • testCloseOnCompletion

        public void testCloseOnCompletion()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isClosed

        static boolean isClosed​(java.lang.Object statement)
                         throws java.lang.Exception
        Calls Statement.isClosed() or ResultSet.isClosed() via reflection.
        Parameters:
        statement - Statement or result set
        Returns:
        Whether statement or result set is closed
        Throws:
        java.lang.Exception - on error
      • closeOnCompletion

        static void closeOnCompletion​(java.lang.Object statement)
                               throws java.lang.Exception
        Calls Statement.closeOnCompletion() via reflection. (It cannot be called directly because it only exists from JDK 1.7 onwards.)
        Parameters:
        statement - Statement or result set
        Throws:
        java.lang.Exception - on error
      • testDrillThrough

        public void testDrillThrough()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testMondrian1353

        public void testMondrian1353()
                              throws java.lang.Exception
        This is a test for MONDRIAN-1353

        An empty stack exception was thrown from the olap4j API if the hierarchy didn't have a all member and the default member was not explicitly set.

        Throws:
        java.lang.Exception
      • testMondrian1390

        public void testMondrian1390()
                              throws java.lang.Exception
        Same as SchemaTest.testMondrian1390() but this time with olap4j.
        Throws:
        java.lang.Exception