Package mondrian.rolap
Class VirtualCubeTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.rolap.BatchTestCase
-
- mondrian.rolap.VirtualCubeTest
-
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
Constructors Constructor Description VirtualCubeTest()
Creates an anonymous VirtualCubeTest.VirtualCubeTest(String name)
Creates a VirtualCubeTest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
testCrossjoinOptimizerWithVirtualCube()
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 propertyvoid
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
testVirtualCubeRecursiveMember()
MONDRIAN-1061void
testWithTimeDimension()
-
Methods inherited from class mondrian.rolap.BatchTestCase
assertNative, assertNoQuerySql, assertNotNative, assertQuerySql, assertQuerySql, assertQuerySql, assertQuerySqlOrNot, assertRequestSql, assertRequestSql, checkNative, checkNative, checkNative, checkNotNative, checkNotNative, checkNotNative, clearAndHardenCache, createBatch, createBatch, createRequest, createRequest, createRequest, createRequest, dialectize, executeQuery, getCube, getFoodMartConnection, getGroupingSet, getMeasure, getRegistry, makeConstraintCountryState, makeConstraintProductFamilyDepartment, makeConstraintYearQuarterMonth, mysqlPattern, sqlPattern
-
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, verifySameNativeAndNot, warehouseMembersCanadaMexicoUsa
-
-
-
-
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".
-
testVirtualCubeRecursiveMember
public void testVirtualCubeRecursiveMember()
MONDRIAN-1061
The idea is that [recurse] is a calculated member uses
CoalesceEmpty((Measures.[Unit Sales], [Time].CurrentMember ) , (Measures.[recurse],[Time].CurrentMember.PrevMember)))
...calculation. Food mart have no data for 1998 quarter, So this way we expect:- not to fall into StackOverflow for recursive calculation when member is referenced in VirtualCube.
- check that CoalesceEmpty calculated correctly (repeatable values from previous not null result)
-
testCrossjoinOptimizerWithVirtualCube
public void testCrossjoinOptimizerWithVirtualCube()
-
-