Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for bug 1614438: CalculatedMember.formatString attribute ignored Also checked in updated intellij ipr file referencing java 1.5 and containing needed libs [git-p4: depot-paths = "//open/mondrian/": change = 8629]
- Loading branch information
Matt Campbell
authored and
Matt Campbell
committed
Jan 31, 2007
1 parent
6d22f4f
commit 9600583
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
// $Id$ | ||
// 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. | ||
// Copyright (C) 2001-2002 Kana Software, Inc. | ||
// Copyright (C) 2001-2005 Julian Hyde and others | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
// | ||
// mkambol, 25 January, 2007 | ||
*/ | ||
package mondrian.rolap; | ||
|
||
import mondrian.test.FoodMartTestCase; | ||
import mondrian.olap.*; | ||
|
||
/** | ||
* Unit test for {@link RolapCubeTest}. | ||
* | ||
* @author mkambol | ||
* @since 25 January, 2007 | ||
* @version $Id$ | ||
*/ | ||
public class RolapCubeTest extends FoodMartTestCase { | ||
|
||
public void testProcessFormatStringAttributeToIgnoreNullFormatString(){ | ||
RolapCube cube = (RolapCube) getConnection().getSchema().lookupCube("Sales", false); | ||
StringBuilder builder = new StringBuilder(); | ||
cube.processFormatStringAttribute(new MondrianDef.CalculatedMember(), builder); | ||
assertEquals(0, builder.length()); | ||
} | ||
|
||
public void testProcessFormatStringAttribute(){ | ||
RolapCube cube = (RolapCube) getConnection().getSchema().lookupCube("Sales", false); | ||
StringBuilder builder = new StringBuilder(); | ||
MondrianDef.CalculatedMember xmlCalcMember = new MondrianDef.CalculatedMember(); | ||
String format = "FORMAT"; | ||
xmlCalcMember.formatString = format; | ||
cube.processFormatStringAttribute(xmlCalcMember, builder); | ||
assertEquals(","+ Util.nl+"FORMAT_STRING = \""+format+"\"", builder.toString()); | ||
} | ||
} |