/**
* Test case for bug <a href="http://jira.pentaho.com/browse/MONDRIAN-902">
* MONDRIAN-902, "mondrian populating the same members on both axes"</a>.
*/
public void testBugMondrian902() {
Result result = executeQuery(
"SELECT\n"
+ "NON EMPTY CrossJoin(\n"
+ " [Education Level].[Education Level].Members,\n"
+ " CrossJoin(\n"
+ " [Product].[Product Family].Members,\n"
+ " [Store].[Store State].Members)) ON COLUMNS,\n"
+ "NON EMPTY CrossJoin(\n"
+ " [Promotions].[Promotion Name].Members,\n"
+ " [Marital Status].[Marital Status].Members) ON ROWS\n"
+ "FROM [Warehouse and Sales]");
assertEquals(
"[[Education Level].[Bachelors Degree], [Product].[Drink], [Store].[USA].[CA]]",
result.getAxes()[0].getPositions().get(0).toString());
assertEquals(45, result.getAxes()[0].getPositions().size());
// With bug MONDRIAN-902, this gave the same result as for axis #0:
assertEquals(
"[[Promotions].[Bag Stuffers], [Marital Status].[M]]",
result.getAxes()[1].getPositions().get(0).toString());
assertEquals(96, result.getAxes()[1].getPositions().size());
}