mondrian.test
Class TestCalculatedMembers

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.test.TestCalculatedMembers
All Implemented Interfaces:
Test

public class TestCalculatedMembers
extends BatchTestCase

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

Since:
5 October, 2002
Version:
$Id: //open/mondrian/testsrc/main/mondrian/test/TestCalculatedMembers.java#59 $
Author:
jhyde

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.rolap.BatchTestCase
BatchTestCase.TestCase
 
Nested classes/interfaces inherited from class mondrian.test.FoodMartTestCase
FoodMartTestCase.QueryAndResult
 
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
TestCalculatedMembers()
           
TestCalculatedMembers(String name)
           
 
Method Summary
 void _testWhole()
           
 void testBracketInCalcMemberName()
          Tests that calculated members can have brackets in their names.
 void testBracketInCubeCalcMemberName()
          Tests that calculated members defined in the schema can have brackets in their names.
 void testCalcMemberCustomFormatterInNonMeasureInQuery()
           
 void testCalcMemberCustomFormatterInQuery()
           
 void testCalcMemberCustomFormatterInQueryNegative()
           
 void testCalcMemberCustomFormatterInQueryNegative2()
           
 void testCalcMemberCustomFormatterInSchema()
           
 void testCalcMemberCustomFormatterInSchemaNegative()
           
 void testCalcMemberIsSetFails()
           
 void testCalcMemberWithQuote()
           
 void testCalculatedMemberCaption()
           
 void testCalculatedMemberChildren()
          test case for bug #1801069, Issues with calculated members verify that the calculated member [Product].[Test] returns an empty children list vs.
 void testCalculatedMemberInCube()
           
 void testCalculatedMemberInCubeAndQuery()
           
 void testCalculatedMemberInCubeViaApi()
           
 void testCalculatedMemberInCubeWithProps()
           
 void testCalculatedMemberInCubeWithSpace()
          Tests a calculated member with spaces in its name against a virtual cube with spaces in its name.
 void testCalculatedMemberMSASCompatibility()
           
 void testChildrenOfCalcMembers()
           
 void testCompoundSlicerOverTuples()
           
 void testCreateCalculatedMember()
           
 void testExponentialPerformanceBugMondrian608()
          Testcase for bug MONDRIAN-608, "Performance issue with large number of measures".
 void testFormatString()
           
 void testNegativeSolveOrder()
          Testcase for bug MONDRIAN-263, Negative Solve Orders broken.
 void testNegativeSolveOrderForCalMemberWithFilter()
          Tests that if a filter is associated with input to a cal member with lower solve order; the filter computation uses the context that contains the other cal members(those with higher solve order).
 void testNegativeSolveOrderForCalMemberWithFilters2()
          Tests that if a filter is associated with input to a cal member with higher solve order; the filter computation ignores the other cal members.
 void testNonCharacterMembers()
           
 void testNonTopLevelCalculatedMember()
          test case for bug #1801069, Issues with calculated members verify that the calculated member [Product].[Food].[Test] definition does not throw errors and returns expected results.
 void testNpeInIif()
          Tests that IIf works OK even if its argument returns the NULL value.
 void testPropertyReferencesCalcMember()
           
 void testQueryCalculatedMemberOverridesCube()
           
 void testQuoteInCalcMember()
          Testcase for bug MONDRIAN-137, "error if calc member in schema file contains single quotes".
 void testSetIncludesSelf()
          Tests a calculated member which aggregates over a set which would seem to include the calculated member (but does not).
 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 testStrToSetInCubeCalcMember()
          Testcase for bug 1784617, "Using StrToTuple() in schema errors out".
 
Methods inherited from class mondrian.rolap.BatchTestCase
assertNative, assertNoQuerySql, assertNotNative, assertQuerySql, assertQuerySql, assertQuerySql, assertQuerySqlOrNot, checkNative, checkNative, checkNative, checkNotNative, checkNotNative, checkNotNative, createBatch, createBatch, dialectize, executeQuery, getCube, getFoodMartConnection, getGroupingSet, getMeasure
 
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, 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

TestCalculatedMembers

public TestCalculatedMembers()

TestCalculatedMembers

public TestCalculatedMembers(String name)
Method Detail

testCalculatedMemberInCube

public void testCalculatedMemberInCube()

testCalculatedMemberInCubeViaApi

public void testCalculatedMemberInCubeViaApi()

testCalculatedMemberInCubeWithSpace

public void testCalculatedMemberInCubeWithSpace()
Tests a calculated member with spaces in its name against a virtual cube with spaces in its name.


testCalculatedMemberInCubeWithProps

public void testCalculatedMemberInCubeWithProps()

testCalculatedMemberInCubeAndQuery

public void testCalculatedMemberInCubeAndQuery()

testQueryCalculatedMemberOverridesCube

public void testQueryCalculatedMemberOverridesCube()

_testWhole

public void _testWhole()

testCalculatedMemberCaption

public void testCalculatedMemberCaption()

testCalcMemberIsSetFails

public void testCalcMemberIsSetFails()

testBracketInCalcMemberName

public void testBracketInCalcMemberName()
Tests that calculated members can have brackets in their names. (Bug 1251683.)


testNpeInIif

public void testNpeInIif()
Tests that IIf works OK even if its argument returns the NULL value. (Bug 1418689.)


testBracketInCubeCalcMemberName

public void testBracketInCubeCalcMemberName()
Tests that calculated members defined in the schema can have brackets in their names. (Bug 1251683.)


testPropertyReferencesCalcMember

public void testPropertyReferencesCalcMember()

testCalcMemberWithQuote

public void testCalcMemberWithQuote()

testQuoteInCalcMember

public void testQuoteInCalcMember()
Testcase for bug MONDRIAN-137, "error if calc member in schema file contains single quotes".


testChildrenOfCalcMembers

public void testChildrenOfCalcMembers()

testNonCharacterMembers

public void testNonCharacterMembers()

testFormatString

public void testFormatString()

testNegativeSolveOrder

public void testNegativeSolveOrder()
Testcase for bug MONDRIAN-263, Negative Solve Orders broken.


testCalcMemberCustomFormatterInQuery

public void testCalcMemberCustomFormatterInQuery()

testCalcMemberCustomFormatterInQueryNegative

public void testCalcMemberCustomFormatterInQueryNegative()

testCalcMemberCustomFormatterInQueryNegative2

public void testCalcMemberCustomFormatterInQueryNegative2()

testCalcMemberCustomFormatterInNonMeasureInQuery

public void testCalcMemberCustomFormatterInNonMeasureInQuery()

testCalcMemberCustomFormatterInSchema

public void testCalcMemberCustomFormatterInSchema()

testCalcMemberCustomFormatterInSchemaNegative

public void testCalcMemberCustomFormatterInSchemaNegative()

testStrToSetInCubeCalcMember

public void testStrToSetInCubeCalcMember()
Testcase for bug 1784617, "Using StrToTuple() in schema errors out".


testCreateCalculatedMember

public void testCreateCalculatedMember()

testSetIncludesSelf

public void testSetIncludesSelf()
Tests a calculated member which aggregates over a set which would seem to include the calculated member (but does not).


testNegativeSolveOrderForCalMemberWithFilter

public void testNegativeSolveOrderForCalMemberWithFilter()
Tests that if a filter is associated with input to a cal member with lower solve order; the filter computation uses the context that contains the other cal members(those with higher solve order).


testNegativeSolveOrderForCalMemberWithFilters2

public void testNegativeSolveOrderForCalMemberWithFilters2()
Tests that if a filter is associated with input to a cal member with higher solve order; the filter computation ignores the other cal members.


testNonTopLevelCalculatedMember

public void testNonTopLevelCalculatedMember()
test case for bug #1801069, Issues with calculated members verify that the calculated member [Product].[Food].[Test] definition does not throw errors and returns expected results.


testCalculatedMemberChildren

public void testCalculatedMemberChildren()
test case for bug #1801069, Issues with calculated members verify that the calculated member [Product].[Test] returns an empty children list vs. invalid behavior of returning [All Products].Children


testCalculatedMemberMSASCompatibility

public void testCalculatedMemberMSASCompatibility()

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.


testCompoundSlicerOverTuples

public void testCompoundSlicerOverTuples()

testExponentialPerformanceBugMondrian608

public void testExponentialPerformanceBugMondrian608()
Testcase for bug MONDRIAN-608, "Performance issue with large number of measures".


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