mondrian.test
Class CompoundSlicerTest

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

public class CompoundSlicerTest
extends FoodMartTestCase

Tests the expressions used for calculated members. Please keep in sync with the actual code used by the wizard.

Since:
15 May, 2009
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
CompoundSlicerTest()
          Creates a CompoundSlicerTest.
CompoundSlicerTest(String name)
          Creates a CompoundSlicerTest with a given name.
 
Method Summary
 void testBugMondrian899()
          Test case for Bug MONDRIAN-899, "Order() function does not work properly together with WHERE clause".
 void testBugMondrian900()
          Test case for Bug MONDRIAN-900, "Filter() function works incorrectly together with WHERE clause".
 void testCompoundSlicer()
          Test case for a basic query with more than one member of the same hierarchy in the WHERE clause.
 void testCompoundSlicerExcept()
          Tests compound slicer with EXCEPT.
 void testCompoundSlicerOverTuples()
          Tests a query with a compond slicer over tuples.
 void testCompoundSlicerWithDistinctCount()
          Compound slicer with distinct-count measure.
 void testEmptySetSlicerReturnsNull()
          Tests that if the slicer contains zero members, all cells are null.
 void testEmptySetSlicerViaExpressionReturnsNull()
          Tests that if the slicer is calculated using an expression and contains zero members, all cells are null.
 void testRollupAvg()
          Tests compound slicer, and other rollups, with AVG function.
 void testSimulatedCompoundSlicer()
          Query that simulates a compound slicer by creating a calculated member that aggregates over a set and places it in the WHERE clause.
 void testSlicerContainsLiteralNull()
          Slicer that is literal null.
 void testSlicerContainsNullMember()
          Slicer that is a member expression that evaluates to null.
 void testSlicerContainsPartiallyNullMember()
          Slicer that is a tuple and one of the members evaluates to null; that makes it a null tuple, and it is eliminated from the list.
 void testTopCount()
           
 void testTopCountAllSlicers()
           
 
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

CompoundSlicerTest

public CompoundSlicerTest()
Creates a CompoundSlicerTest.


CompoundSlicerTest

public CompoundSlicerTest(String name)
Creates a CompoundSlicerTest with a given name.

Parameters:
name - Test name
Method Detail

testSimulatedCompoundSlicer

public void testSimulatedCompoundSlicer()
Query that simulates a compound slicer by creating a calculated member that aggregates over a set and places it in the WHERE clause.


testCompoundSlicerExcept

public void testCompoundSlicerExcept()
Tests compound slicer with EXCEPT.

Test case for Bug MONDRIAN-637, "Using Except in the slicer makes no sense".


testCompoundSlicerOverTuples

public void testCompoundSlicerOverTuples()
Tests a query with a compond slicer over tuples. (Multiple rows, each of which has multiple members.)


testEmptySetSlicerReturnsNull

public void testEmptySetSlicerReturnsNull()
Tests that if the slicer contains zero members, all cells are null.


testEmptySetSlicerViaExpressionReturnsNull

public void testEmptySetSlicerViaExpressionReturnsNull()
Tests that if the slicer is calculated using an expression and contains zero members, all cells are null.


testCompoundSlicer

public void testCompoundSlicer()
Test case for a basic query with more than one member of the same hierarchy in the WHERE clause.


testSlicerContainsNullMember

public void testSlicerContainsNullMember()
Slicer that is a member expression that evaluates to null. SSAS 2005 allows this, and returns null cells.


testSlicerContainsLiteralNull

public void testSlicerContainsLiteralNull()
Slicer that is literal null. SSAS 2005 allows this, and returns null cells; Mondrian currently gives an error.


testSlicerContainsPartiallyNullMember

public void testSlicerContainsPartiallyNullMember()
Slicer that is a tuple and one of the members evaluates to null; that makes it a null tuple, and it is eliminated from the list. SSAS 2005 allows this, and returns null cells.


testCompoundSlicerWithDistinctCount

public void testCompoundSlicerWithDistinctCount()
Compound slicer with distinct-count measure.


testRollupAvg

public void testRollupAvg()
Tests compound slicer, and other rollups, with AVG function.

Test case for Bug MONDRIAN-675, "Allow rollup of measures based on AVG aggregate function".


testBugMondrian899

public void testBugMondrian899()
Test case for Bug MONDRIAN-899, "Order() function does not work properly together with WHERE clause".


testTopCount

public void testTopCount()

testTopCountAllSlicers

public void testTopCountAllSlicers()

testBugMondrian900

public void testBugMondrian900()
Test case for Bug MONDRIAN-900, "Filter() function works incorrectly together with WHERE clause".


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