mondrian.rolap
Class VirtualCubeTest

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

public class VirtualCubeTest
extends BatchTestCase

Unit tests for virtual cubes.

Since:
Feb 14, 2003
Author:
remberson

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.rolap.BatchTestCase
BatchTestCase.Bomb, BatchTestCase.CellRequestConstraint, BatchTestCase.TestCase, BatchTestCase.TestListener
 
Field Summary
 
Fields inherited from class mondrian.rolap.BatchTestCase
cubeNameSales, fieldGender, fieldProductDepartment, fieldProductFamily, fieldValueProductDepartment, fieldValuesGender, fieldValuesProductFamily, fieldValuesYear, fieldYear, measureUnitSales, tableCustomer, tableProductClass, tableTime
 
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
 
Constructor Summary
VirtualCubeTest()
          Creates an anonymous VirtualCubeTest.
VirtualCubeTest(String name)
          Creates a VirtualCubeTest.
 
Method Summary
 void testAllMeasureMembers()
           
 void testBugMondrian322()
          Test case for bug MONDRIAN-322, "cube.getStar() throws NullPointerException".
 void testBugMondrian322a()
           
 void testBugMondrian902()
          Test case for bug MONDRIAN-902, "mondrian populating the same members on both axes".
 void testCalculatedMeasure()
           
 void testCalculatedMeasureAcrossCubes()
          Tests a calc measure which combines a measures from the Sales cube with a measures from the Warehouse cube.
 void testCalculatedMeasureAsDefaultMeasureInVC()
           
 void testCalculatedMemberInSchema()
          Tests a calc member defined in the cube.
 void testDefaultMeasureInVCForCaseSensitivity()
           
 void testDefaultMeasureInVCForIncorrectMeasureName()
           
 void testDefaultMeasureProperty()
           
 void testFormatStringExpressionCubeNoCache()
          Test an expression for the format_string of a calculated member that evaluates calculated members based on a virtual cube.
 void testLostData()
           
 void testMemberVisibility()
           
 void testNativeSetCaching()
          Checks that native set caching considers base cubes in the cache key.
 void testNonDefaultAllMember()
          Query a virtual cube that contains a non-conforming dimension that does not have ALL as its default member.
 void testNonDefaultAllMember2()
           
 void testNonEmptyCJConstraintOnVirtualCube()
          Tests that the logic to apply non empty context constraint in virtual cube is correct.
 void testNonEmptyConstraintOnVirtualCubeWithCalcMeasure()
          Tests that the logic to apply non empty context constraint in virtual cube is correct.
 void testNoTimeDimension()
          Test case for bug MONDRIAN-163, "VirtualCube SegmentArrayQuerySpec.addMeasure assert".
 void testOrdinalColumn()
          Test a virtual cube where one of the dimensions contains an ordinalColumn property
 void testRolapCubeLevelInVirtualCube()
          Test that RolapCubeLevel is used correctly in the context of virtual cube.
 void testVirtualCubeMeasureCaption()
          Test case for bug MONDRIAN-352, "Caption is not set on RolapVirtualCubeMesure".
 void testVirtualCubeMeasureInvalidCubeName()
           
 void testWithTimeDimension()
           
 
Methods inherited from class mondrian.rolap.BatchTestCase
assertNative, assertNoQuerySql, assertNotNative, assertQuerySql, assertQuerySql, assertQuerySql, assertQuerySqlOrNot, assertRequestSql, assertRequestSql, checkNative, checkNative, checkNative, checkNotNative, checkNotNative, checkNotNative, createBatch, createBatch, createRequest, createRequest, createRequest, createRequest, dialectize, executeQuery, getCube, getFoodMartConnection, getGroupingSet, getMeasure, getRegistry, makeConstraintCountryState, makeConstraintProductFamilyDepartment, makeConstraintYearQuarterMonth
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualCubeTest

public VirtualCubeTest()
Creates an anonymous VirtualCubeTest.


VirtualCubeTest

public VirtualCubeTest(String name)
Creates a VirtualCubeTest.

Parameters:
name - Test case name
Method Detail

testNoTimeDimension

public void testNoTimeDimension()
Test case for bug MONDRIAN-163, "VirtualCube SegmentArrayQuerySpec.addMeasure assert".


testCalculatedMeasureAsDefaultMeasureInVC

public void testCalculatedMeasureAsDefaultMeasureInVC()

testDefaultMeasureInVCForIncorrectMeasureName

public void testDefaultMeasureInVCForIncorrectMeasureName()

testVirtualCubeMeasureInvalidCubeName

public void testVirtualCubeMeasureInvalidCubeName()

testDefaultMeasureInVCForCaseSensitivity

public void testDefaultMeasureInVCForCaseSensitivity()

testWithTimeDimension

public void testWithTimeDimension()

testNonDefaultAllMember

public void testNonDefaultAllMember()
Query a virtual cube that contains a non-conforming dimension that does not have ALL as its default member.


testNonDefaultAllMember2

public void testNonDefaultAllMember2()

testMemberVisibility

public void testMemberVisibility()

testFormatStringExpressionCubeNoCache

public void testFormatStringExpressionCubeNoCache()
Test an expression for the format_string of a calculated member that evaluates calculated members based on a virtual cube. One cube has cache turned on, the other cache turned off.

Since evaluation of the format_string used to happen after the aggregate cache was cleared, this used to fail, this should be solved with the caching of the format string.

Without caching of format string, the query returns green for all styles.


testCalculatedMeasure

public void testCalculatedMeasure()

testLostData

public void testLostData()

testCalculatedMeasureAcrossCubes

public void testCalculatedMeasureAcrossCubes()
Tests a calc measure which combines a measures from the Sales cube with a measures from the Warehouse cube.


testCalculatedMemberInSchema

public void testCalculatedMemberInSchema()
Tests a calc member defined in the cube.


testAllMeasureMembers

public void testAllMeasureMembers()

testOrdinalColumn

public void testOrdinalColumn()
Test a virtual cube where one of the dimensions contains an ordinalColumn property


testDefaultMeasureProperty

public void testDefaultMeasureProperty()

testNativeSetCaching

public void testNativeSetCaching()
Checks that native set caching considers base cubes in the cache key. Native sets referencing different base cubes do not share the cached result.


testBugMondrian322

public void testBugMondrian322()
Test case for bug MONDRIAN-322, "cube.getStar() throws NullPointerException". Happens when you aggregate distinct-count measures in a virtual cube.


testBugMondrian322a

public void testBugMondrian322a()

testVirtualCubeMeasureCaption

public void testVirtualCubeMeasureCaption()
Test case for bug MONDRIAN-352, "Caption is not set on RolapVirtualCubeMesure".


testRolapCubeLevelInVirtualCube

public void testRolapCubeLevelInVirtualCube()
Test that RolapCubeLevel is used correctly in the context of virtual cube.


testNonEmptyCJConstraintOnVirtualCube

public void testNonEmptyCJConstraintOnVirtualCube()
Tests that the logic to apply non empty context constraint in virtual cube is correct. The joins shouldn't be cartesian product.


testNonEmptyConstraintOnVirtualCubeWithCalcMeasure

public void testNonEmptyConstraintOnVirtualCubeWithCalcMeasure()
Tests that the logic to apply non empty context constraint in virtual cube is correct. The joins shouldn't be cartesian product.


testBugMondrian902

public void testBugMondrian902()
Test case for bug MONDRIAN-902, "mondrian populating the same members on both axes".


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