Search in sources :

Example 16 with MondrianProperties

use of mondrian.olap.MondrianProperties in project mondrian by pentaho.

the class BUG_1541077 method testSalesCount.

public void testSalesCount() throws Exception {
    if (!isApplicable()) {
        return;
    }
    MondrianProperties props = MondrianProperties.instance();
    // get value without aggregates
    propSaver.set(props.UseAggregates, false);
    String mdx = "select {[Measures].[Sales Count]} on columns from Cheques";
    Result result = getTestContext().executeQuery(mdx);
    Object v = result.getCell(new int[] { 0 }).getValue();
    propSaver.set(props.UseAggregates, true);
    Result result1 = getTestContext().executeQuery(mdx);
    Object v1 = result1.getCell(new int[] { 0 }).getValue();
    assertTrue(v.equals(v1));
}
Also used : MondrianProperties(mondrian.olap.MondrianProperties) Result(mondrian.olap.Result)

Aggregations

MondrianProperties (mondrian.olap.MondrianProperties)16 Result (mondrian.olap.Result)5 Method (java.lang.reflect.Method)1 Pattern (java.util.regex.Pattern)1 TestCase (junit.framework.TestCase)1 TestSuite (junit.framework.TestSuite)1 UtilTestCase (mondrian.olap.UtilTestCase)1