mondrian.xmla
Class XmlaMetaDataConstraintsTest

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

public class XmlaMetaDataConstraintsTest
extends XmlaBaseTestCase

This test creates 2 catalogs and constraints on one of them. Then it runs a few queries to check that the filtering occurs as expected.


Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.xmla.XmlaBaseTestCase
XmlaBaseTestCase.Action, XmlaBaseTestCase.CallBack, XmlaBaseTestCase.XmlaRequestCallbackImpl
 
Field Summary
 
Fields inherited from class mondrian.xmla.XmlaBaseTestCase
CATALOG, CATALOG_NAME_PROP, CATALOG_PROP, catalogNameUrls, CUBE_NAME_PROP, DATA_SOURCE_INFO, DATA_SOURCE_INFO_PROP, DEBUG, FORMAT_MULTI_DIMENSIONAL, FORMAT_PROP, LAST_SCHEMA_UPDATE_DATE, LOCALE_PROP, REQUEST_TYPE_PROP, ROLE_PROP, SALES_CUBE, SESSION_ID_PROP
 
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
 
Constructor Summary
XmlaMetaDataConstraintsTest()
           
 
Method Summary
protected  String filterConnectString(String original)
           
protected  Map<String,String> getCatalogNameUrls(TestContext testContext)
           
protected  DiffRepository getDiffRepos()
           
protected  Class<? extends XmlaRequestCallback> getServletCallbackClass()
           
protected  String getSessionId(XmlaBaseTestCase.Action action)
          Creates, retrieves or clears the session id for this test.
protected  void setUp()
           
 void testCatalogsFiltered()
           
 void testCatalogsFilteredByRestraints()
           
 void testCubesFiltered()
           
 void testCubesFilteredByRestraints()
           
 void testDBSchemataFiltered()
           
 void testDBSchemataFilteredByRestraints()
           
 
Methods inherited from class mondrian.xmla.XmlaBaseTestCase
doTest, doTest, doTest, doTest, doTestInline, doTestInline, doTests, doTestsJson, fileToDocument, fileToString, filter, generateExpectedString, generateRequestString, getDefaultRequestProperties, getServlet, getSessionId, helperTest, helperTestExpect, replaceLastSchemaUpdateDate, tearDown, validate
 
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, warehouseMembersCanadaMexicoUsa
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

XmlaMetaDataConstraintsTest

public XmlaMetaDataConstraintsTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

getCatalogNameUrls

protected Map<String,String> getCatalogNameUrls(TestContext testContext)
Overrides:
getCatalogNameUrls in class XmlaBaseTestCase

filterConnectString

protected String filterConnectString(String original)
Overrides:
filterConnectString in class XmlaBaseTestCase

testDBSchemataFiltered

public void testDBSchemataFiltered()
                            throws Exception
Throws:
Exception

testDBSchemataFilteredByRestraints

public void testDBSchemataFilteredByRestraints()
                                        throws Exception
Throws:
Exception

testCatalogsFiltered

public void testCatalogsFiltered()
                          throws Exception
Throws:
Exception

testCatalogsFilteredByRestraints

public void testCatalogsFilteredByRestraints()
                                      throws Exception
Throws:
Exception

testCubesFiltered

public void testCubesFiltered()
                       throws Exception
Throws:
Exception

testCubesFilteredByRestraints

public void testCubesFilteredByRestraints()
                                   throws Exception
Throws:
Exception

getDiffRepos

protected DiffRepository getDiffRepos()
Specified by:
getDiffRepos in class XmlaBaseTestCase

getServletCallbackClass

protected Class<? extends XmlaRequestCallback> getServletCallbackClass()
Specified by:
getServletCallbackClass in class XmlaBaseTestCase

getSessionId

protected String getSessionId(XmlaBaseTestCase.Action action)
Description copied from class: XmlaBaseTestCase
Creates, retrieves or clears the session id for this test.

Specified by:
getSessionId in class XmlaBaseTestCase
Parameters:
action - Action to perform
Returns:
Session id for create, query; null for clear

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