mondrian.test
Class ParameterTest

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

public class ParameterTest
extends FoodMartTestCase

A ParameterTest is a test suite for functionality relating to parameters.

Since:
Feb 13, 2003
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
ParameterTest(String name)
           
 
Method Summary
 void _testParameterDuplicateDimensionFails()
          Parameter in slicer and expression on columns axis are both of [Gender] hierarchy, which is illegal.
 void dontTestParamRef()
          Mondrian can not handle forward references
 void testAssignMemberParameter()
          Positive and negative tests assigning values to a parameter whose type is a member.
 void testAssignNumericParameter()
          Positive and negative tests assigning values to a parameter of type NUMERIC.
 void testAssignSetParameter()
          Positive and negative tests assigning values to a parameter whose type is a set of members.
 void testAssignStringParameter()
          Positive and negative tests assigning values to a parameter of type STRING.
 void testChangeable()
           
 void testConnectionPropsCannotBeOverridden()
          Tests that non-overrideable properties cannot be overridden in a statement.
 void testConnectionPropsWhichShouldBeNull()
          Tests that certain connection properties which should be null, are.
 void testDerivedParameter()
          Tests a parameter derived from another parameter.
 void testMemberParameterNull()
           
 void testMondrianPropsGetJava()
          Tests getting a mondrian property.
 void testNullStrToMember()
          Test case for bug MONDRIAN-745, "NullPointerException when passing in null param value".
 void testNumericParameter()
           
 void testNumericParameterNull()
           
 void testNumericParameterStringValueFails()
           
 void testParamBadTypeFails()
           
 void testParamCyclicFails()
           
 void testParamCyclicOk()
           
 void testParamDefinedTwiceFails()
           
 void testParameterDimension()
           
 void testParameterHierarchy()
           
 void testParameterInFormatString_Bug1584439()
           
 void testParameterInFormatString()
           
 void testParameterInSlicer()
           
 void testParameterLevel()
           
 void testParameterMemberDefaultValue()
          Tests that a dimension name can be used as the default value of a member-valued parameter.
 void testParameterMemberDefaultValue2()
          Non-trivial default value.
 void testParameterMemberFails()
           
 void testParameterMemberFailsBadLevel()
          Tests that member parameter fails validation if the level name is invalid.
 void testParameterMetadata()
           
 void testParameterOnAxis()
           
 void testParameterWithExpressionForHierarchyFails()
           
 void testParamRefWithoutParamFails()
           
 void testParamSet()
          Tests a parameter whose type is a set of members.
 void testSchemaProp()
          Tests a schema property with a default value.
 void testSchemaPropContext()
          Tests that a schema property fails if it references dimensions which are not available.
 void testSchemaPropDupFails()
          Tests a schema property with a default value.
 void testSchemaPropIllegalTypeFails()
           
 void testSchemaPropInvalidDefaultExpFails()
           
 void testSetUnsetParameter()
           
 void testStringParameter()
           
 void testStringParameterNull()
           
 void testSystemPropsGet()
          Tests accessing system properties as parameters in a statement.
 void testSystemPropsGetJava()
          Tests getting a java system property.
 void testSystemPropsSet()
          Tests setting system properties.
 void testTwoParametersBug1425153()
           
 
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

ParameterTest

public ParameterTest(String name)
Method Detail

testChangeable

public void testChangeable()

testParameterInFormatString

public void testParameterInFormatString()

testParameterInFormatString_Bug1584439

public void testParameterInFormatString_Bug1584439()

testParameterOnAxis

public void testParameterOnAxis()

testNumericParameter

public void testNumericParameter()

testStringParameter

public void testStringParameter()

testStringParameterNull

public void testStringParameterNull()

testNumericParameterNull

public void testNumericParameterNull()

testMemberParameterNull

public void testMemberParameterNull()

testNullStrToMember

public void testNullStrToMember()
Test case for bug MONDRIAN-745, "NullPointerException when passing in null param value".


testSetUnsetParameter

public void testSetUnsetParameter()

testNumericParameterStringValueFails

public void testNumericParameterStringValueFails()

testParameterDimension

public void testParameterDimension()

testParameterHierarchy

public void testParameterHierarchy()

testParameterLevel

public void testParameterLevel()

testParameterMemberFails

public void testParameterMemberFails()

testParameterMemberFailsBadLevel

public void testParameterMemberFailsBadLevel()
Tests that member parameter fails validation if the level name is invalid.


testParameterMemberDefaultValue

public void testParameterMemberDefaultValue()
Tests that a dimension name can be used as the default value of a member-valued parameter. It is interpreted to mean the default value of that dimension.


testParameterMemberDefaultValue2

public void testParameterMemberDefaultValue2()
Non-trivial default value. Example shows how to set the parameter to the last month that someone in Bellflower, CA had a good beer. You can use it to solve the more common problem "How do I automatically set the time dimension to the latest date for which there are transactions?".


testParameterWithExpressionForHierarchyFails

public void testParameterWithExpressionForHierarchyFails()

testDerivedParameter

public void testDerivedParameter()
Tests a parameter derived from another parameter. OK as long as it is not cyclic.


testParameterInSlicer

public void testParameterInSlicer()

_testParameterDuplicateDimensionFails

public void _testParameterDuplicateDimensionFails()
Parameter in slicer and expression on columns axis are both of [Gender] hierarchy, which is illegal.


dontTestParamRef

public void dontTestParamRef()
Mondrian can not handle forward references


testParamRefWithoutParamFails

public void testParamRefWithoutParamFails()

testParamDefinedTwiceFails

public void testParamDefinedTwiceFails()

testParamBadTypeFails

public void testParamBadTypeFails()

testParamCyclicOk

public void testParamCyclicOk()

testParamCyclicFails

public void testParamCyclicFails()

testParameterMetadata

public void testParameterMetadata()

testTwoParametersBug1425153

public void testTwoParametersBug1425153()

testAssignNumericParameter

public void testAssignNumericParameter()
Positive and negative tests assigning values to a parameter of type NUMERIC.


testAssignStringParameter

public void testAssignStringParameter()
Positive and negative tests assigning values to a parameter of type STRING.


testAssignMemberParameter

public void testAssignMemberParameter()
Positive and negative tests assigning values to a parameter whose type is a member.


testAssignSetParameter

public void testAssignSetParameter()
Positive and negative tests assigning values to a parameter whose type is a set of members.


testParamSet

public void testParamSet()
Tests a parameter whose type is a set of members.


testConnectionPropsWhichShouldBeNull

public void testConnectionPropsWhichShouldBeNull()
Tests that certain connection properties which should be null, are.


testConnectionPropsCannotBeOverridden

public void testConnectionPropsCannotBeOverridden()
Tests that non-overrideable properties cannot be overridden in a statement.


testSystemPropsGet

public void testSystemPropsGet()
Tests accessing system properties as parameters in a statement.


testSystemPropsGetJava

public void testSystemPropsGetJava()
Tests getting a java system property.


testMondrianPropsGetJava

public void testMondrianPropsGetJava()
Tests getting a mondrian property.


testSystemPropsSet

public void testSystemPropsSet()
Tests setting system properties.


testSchemaProp

public void testSchemaProp()
Tests a schema property with a default value.


testSchemaPropDupFails

public void testSchemaPropDupFails()
Tests a schema property with a default value.


testSchemaPropIllegalTypeFails

public void testSchemaPropIllegalTypeFails()

testSchemaPropInvalidDefaultExpFails

public void testSchemaPropInvalidDefaultExpFails()

testSchemaPropContext

public void testSchemaPropContext()
Tests that a schema property fails if it references dimensions which are not available.


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