mondrian.xmla
Class XmlaExcel2007Test

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.XmlaExcel2007Test
All Implemented Interfaces:
junit.framework.Test

public class XmlaExcel2007Test
extends XmlaBaseTestCase

Test suite for compatibility of Mondrian XMLA with Excel 2007.

Author:
Richard M. Emberson

Nested Class Summary
(package private) static class XmlaExcel2007Test.Callback
           
 
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
XmlaExcel2007Test()
           
XmlaExcel2007Test(String name)
           
 
Method Summary
protected  String filter(String testCaseName, String filename, String content)
          Filters the content of a test resource.
protected  DiffRepository getDiffRepos()
           
protected  Class<? extends XmlaRequestCallback> getServletCallbackClass()
           
protected  String getSessionId(XmlaBaseTestCase.Action action)
          Creates, retrieves or clears the session id for this test.
 void test01()
          Testcase for bug MONDRIAN-679, "VisualTotals gives ClassCastException when called via XMLA".
 void testBugMondrian761()
          Testcase for bug MONDRIAN-761, "VisualTotalMember cannot be cast to RolapCubeMember".
 void testCellInfo()
          Tests that executed MDX query with CELL PROPERTIES included; bug MONDRIAN-708, "After change 13351 all Excel pivots fail to update.
 void testMdschemaPropertiesCell()
          Test that executes MDSCHEMA_PROPERTIES with Property.TypeFlag.CELL.
 void testMdschemaPropertiesMember()
          Test that executes MDSCHEMA_PROPERTIES with Property.TypeFlag.MEMBER.
 void testMemberPropertiesAndSlicer()
          Test that checks that (a) member properties are in correct format for Excel 2007, (b) the slicer axis is in the correct format for Excel 2007.
 void testUniqueName()
          Tests that mondrian can correctly answer the extra queries generated by Excel 2007 in bug MONDRIAN-726, "Change 13509 is not Excel 2007 compatible".
 
Methods inherited from class mondrian.xmla.XmlaBaseTestCase
doTest, doTest, doTest, doTest, doTestInline, doTestInline, doTests, doTestsJson, fileToDocument, fileToString, filterConnectString, generateExpectedString, generateRequestString, getCatalogNameUrls, 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, 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

XmlaExcel2007Test

public XmlaExcel2007Test()

XmlaExcel2007Test

public XmlaExcel2007Test(String name)
Method Detail

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

getServletCallbackClass

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

getDiffRepos

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

filter

protected String filter(String testCaseName,
                        String filename,
                        String content)
Description copied from class: XmlaBaseTestCase
Filters the content of a test resource. The default implementation returns the content unchanged, but a derived class might override this method to change the content.

Overrides:
filter in class XmlaBaseTestCase
Parameters:
testCaseName - Name of current test case, e.g. "testFoo"
filename - Name of requested content, e.g. "${request}"
content - Content
Returns:
Modified content

test01

public void test01()

Testcase for bug MONDRIAN-679, "VisualTotals gives ClassCastException when called via XMLA".


testMemberPropertiesAndSlicer

public void testMemberPropertiesAndSlicer()
Test that checks that (a) member properties are in correct format for Excel 2007, (b) the slicer axis is in the correct format for Excel 2007.


testMdschemaPropertiesMember

public void testMdschemaPropertiesMember()
Test that executes MDSCHEMA_PROPERTIES with Property.TypeFlag.MEMBER.


testMdschemaPropertiesCell

public void testMdschemaPropertiesCell()
Test that executes MDSCHEMA_PROPERTIES with Property.TypeFlag.CELL.

Throws:
Exception - on error

testUniqueName

public void testUniqueName()
Tests that mondrian can correctly answer the extra queries generated by Excel 2007 in bug MONDRIAN-726, "Change 13509 is not Excel 2007 compatible".


testCellInfo

public void testCellInfo()
Tests that executed MDX query with CELL PROPERTIES included; bug MONDRIAN-708, "After change 13351 all Excel pivots fail to update. CellInfo element in XMLA response is wrong".

CellInfo element should always contain all requested cell properties. Cell itself can contain fewer properties than requested.

Currently most properties are not implemented or not defined. If they get implemented then test needs to be changed.


testBugMondrian761

public void testBugMondrian761()

Testcase for bug MONDRIAN-761, "VisualTotalMember cannot be cast to RolapCubeMember".


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