mondrian.test
Class Olap4jTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by mondrian.test.FoodMartTestCase
              extended by mondrian.test.Olap4jTest
All Implemented Interfaces:
Test

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

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.test.FoodMartTestCase
FoodMartTestCase.QueryAndResult
 
Field Summary
 
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
 
Constructor Summary
Olap4jTest()
           
Olap4jTest(String name)
           
 
Method Summary
(package private) static void closeOnCompletion(Object statement)
          Calls java.sql.Statement#closeOnCompletion() via reflection.
(package private) static boolean isClosed(Object statement)
          Calls Statement.isClosed() or ResultSet.isClosed() via reflection.
 void testAnnotation()
           
 void testCellProperties()
           
 void testCloseOnCompletion()
           
 void testFormatString()
           
 void testLevelProperties()
          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.
 void testLimit()
          Same case as BasicQueryTest.testQueryIterationLimit(), but this time, check that the OlapException has the required SQLstate.
 void testParse()
           
 void testSameMemberByVariousMeans()
          Test case for bug MONDRIAN-920, "olap4j: inconsistent measure's member type".
 
Methods inherited from class mondrian.test.FoodMartTestCase
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, getTestContext, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, tearDown, warehouseMembersCanadaMexicoUsa
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Olap4jTest

public Olap4jTest()

Olap4jTest

public Olap4jTest(String name)
Method Detail

testSameMemberByVariousMeans

public void testSameMemberByVariousMeans()
                                  throws SQLException
Test case for bug MONDRIAN-920, "olap4j: inconsistent measure's member type".

Throws:
SQLException - on error

testAnnotation

public void testAnnotation()
                    throws SQLException
Throws:
SQLException

testFormatString

public void testFormatString()
                      throws SQLException
Throws:
SQLException

testLevelProperties

public void testLevelProperties()
                         throws 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:
SQLException - on error

testCellProperties

public void testCellProperties()
                        throws SQLException
Throws:
SQLException

testLimit

public void testLimit()
               throws SQLException
Same case as BasicQueryTest.testQueryIterationLimit(), but this time, check that the OlapException has the required SQLstate.

Throws:
SQLException - on error

testCloseOnCompletion

public void testCloseOnCompletion()
                           throws Exception
Throws:
Exception

isClosed

static boolean isClosed(Object statement)
                 throws Exception
Calls Statement.isClosed() or ResultSet.isClosed() via reflection.

Parameters:
statement - Statement or result set
Returns:
Whether statement or result set is closed
Throws:
Exception - on error

closeOnCompletion

static void closeOnCompletion(Object statement)
                       throws Exception
Calls java.sql.Statement#closeOnCompletion() via reflection.

Parameters:
statement - Statement or result set
Throws:
Exception - on error

testParse

public void testParse()
               throws SQLException
Throws:
SQLException

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads