Skip to content

Commit

Permalink
MONDRIAN: Fix access-control test output.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 407]
  • Loading branch information
julianhyde committed Mar 30, 2003
1 parent 5924ae3 commit e023341
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/main/mondrian/test/AccessControlTest.java
Expand Up @@ -3,7 +3,7 @@
// This software is subject to the terms of the Common Public License
// Agreement, available at the following URL:
// http://www.opensource.org/licenses/cpl.html.
// (C) Copyright 2003-2003 Julian Hyde
// Copyright (C) 2003-2003 Julian Hyde <jhyde@users.sf.net>
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
Expand All @@ -14,7 +14,7 @@
import mondrian.olap.*;

/**
* A <code>AccessControlTest</code> contains unit-tests for access-control
* <code>AccessControlTest</code> is a set of unit-tests for access-control.
*
* @see Role
*
Expand Down Expand Up @@ -151,8 +151,17 @@ public void testGrantHierarchy8() {
Axis axis = executeAxis2(restrictedConnection, "[Customers].members");
assertEquals(122, axis.positions.length); // 13 states, 109 cities
}
/** Test that we only aggregate over SF, LA, even when called from functions. */
public void testGrantHierarchy9() {
// assert: only aggregate over SF, LA, even when called from functions
// Analysis services doesn't allow aggregation within calculated
// measures, so use the following query to generate the results:
//
// with member [Store].[SF LA] as
// 'Aggregate({[USA].[CA].[San Francisco], [Store].[USA].[CA].[Los Angeles]})'
// select {[Measures].[Unit Sales]} on columns,
// {[Gender].children} on rows
// from Sales
// where ([Marital Status].[S], [Store].[SF LA])
Result result = execute(getRestrictedConnection(),
"with member [Measures].[California Unit Sales] as " +
" 'Aggregate({[Store].[USA].[CA].children}, [Measures].[Unit Sales])'" + nl +
Expand All @@ -167,8 +176,8 @@ public void testGrantHierarchy9() {
"Axis #2:" + nl +
"{[Gender].[All Gender].[F]}" + nl +
"{[Gender].[All Gender].[M]}" + nl +
"Row #0: 7104.0" + nl +
"Row #1: 7055.0" + nl,
"Row #0: 6,636" + nl +
"Row #1: 7,329" + nl,
toString(result));
}
public void testGrantHierarchyA() {
Expand Down Expand Up @@ -221,4 +230,4 @@ private Connection getRestrictedConnection() {
have not fixed Cube.getMeasures) */
}

// End AccessControlTest.java
// End AccessControlTest.java

0 comments on commit e023341

Please sign in to comment.