Package mondrian.test

Class TestCalculatedMembers


  • 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
    Author:
    jhyde
    • Constructor Detail

      • TestCalculatedMembers

        public TestCalculatedMembers()
      • TestCalculatedMembers

        public TestCalculatedMembers​(java.lang.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()
      • testQueryCalcMemberOverridesShallowerStoredMember

        public void testQueryCalcMemberOverridesShallowerStoredMember()
      • testEarlierCalcMember

        public void testEarlierCalcMember()
        If there are multiple calc members with the same name, the first is chosen, even if it is not the best match.
      • _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()
      • testChildrenOfCalcMembers

        public void testChildrenOfCalcMembers()
      • testNonCharacterMembers

        public void testNonCharacterMembers()
      • testFormatString

        public void testFormatString()
      • 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 MONDRIAN-335, "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 MONDRIAN-335, "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()
      • testCycleFalsePositive

        public void testCycleFalsePositive()
        Test case for MONDRIAN-638, "Stack trace when grand total turned on". The cause of the problem were negative SOLVE_ORDER values. We were incorrectly populating RolapEvaluator.expandingMember from the parent evaluator, which made it look like two evaluation contexts were expanding the same member.
      • testBugMondrian852

        public void testBugMondrian852()
        Testcase for bug MONDRIAN-852, "Using the generate command, cast and calculated measures causes ClassCastException".

        The problem is in the implicit conversion that occurs when using a member as a numeric value. (In this case the conversion occurs because we apply the numeric operator '/'.) We have to assume at prepare time that the current measure will be numeric, but at run time the value may be a string.

        We were wrongly throwing a ClassCastException. Correct behavior is an evaluation exception: the cell is in error, but the query as a whole succeeds.

      • testNonCanonical

        public void testNonCanonical()
        Tests referring to a calc member by a name other than its canonical unique name.
      • testCalcMemberParentOfCalcMember

        public void testCalcMemberParentOfCalcMember()
      • testCalcMemberSameNameDifferentHierarchies

        public void testCalcMemberSameNameDifferentHierarchies()
      • testCalcMemberTooDeep

        public void testCalcMemberTooDeep()