Search in sources :

Example 1 with TestContext

use of mondrian.test.TestContext in project mondrian by pentaho.

the class SharedDimensionTest method testNECJMemberList.

public void testNECJMemberList() {
    // Schema has two cubes sharing a dimension.
    // Query from the second cube.
    TestContext testContext = getTestContextForSharedDimCubeACubeB();
    testContext.assertQueryReturns(queryNECJMemberList, resultNECJMemberList);
}
Also used : TestContext(mondrian.test.TestContext)

Example 2 with TestContext

use of mondrian.test.TestContext in project mondrian by pentaho.

the class SharedDimensionTest method testNECJMultiLevelMemberList.

public void testNECJMultiLevelMemberList() {
    // Schema has two cubes sharing a dimension.
    // Query from the first cube.
    // This is a case where not using alias not only affects performance,
    // but also produces incorrect result.
    TestContext testContext = getTestContextForSharedDimCubeACubeB();
    testContext.assertQueryReturns(queryNECJMultiLevelMemberList, resultNECJMultiLevelMemberList);
}
Also used : TestContext(mondrian.test.TestContext)

Example 3 with TestContext

use of mondrian.test.TestContext in project mondrian by pentaho.

the class SharedDimensionTest method testB.

public void testB() {
    // Schema has two cubes sharing a dimension.
    // Query from the second cube.
    TestContext testContext = getTestContextForSharedDimCubeACubeB();
    testContext.assertQueryReturns(queryCubeB, resultCubeB);
}
Also used : TestContext(mondrian.test.TestContext)

Example 4 with TestContext

use of mondrian.test.TestContext in project mondrian by pentaho.

the class SharedDimensionTest method testVirtualCube.

public void testVirtualCube() {
    // Schema has two cubes sharing a dimension, and a virtual cube built
    // over these two cubes.
    // Query from the virtual cube.
    TestContext testContext = TestContext.instance().create(sharedDimension, cubeA + "\n" + cubeB, virtualCube, null, null, null);
    testContext.assertQueryReturns(queryVirtualCube, resultVirtualCube);
}
Also used : TestContext(mondrian.test.TestContext)

Example 5 with TestContext

use of mondrian.test.TestContext in project mondrian by pentaho.

the class SharedDimensionTest method testA.

public void testA() {
    // Schema has two cubes sharing a dimension.
    // Query from the first cube.
    TestContext testContext = getTestContextForSharedDimCubeACubeB();
    testContext.assertQueryReturns(queryCubeA, resultCubeA);
}
Also used : TestContext(mondrian.test.TestContext)

Aggregations

TestContext (mondrian.test.TestContext)167 SqlPattern (mondrian.test.SqlPattern)37 Result (mondrian.olap.Result)4 Member (mondrian.olap.Member)3 AggStar (mondrian.rolap.aggmatcher.AggStar)3 MemberExpr (mondrian.mdx.MemberExpr)2 Connection (mondrian.olap.Connection)2 Query (mondrian.olap.Query)2 QueryAxis (mondrian.olap.QueryAxis)2 TestMember (mondrian.olap.fun.TestMember)2 Execution (mondrian.server.Execution)2 Dialect (mondrian.spi.Dialect)2 SoftReference (java.lang.ref.SoftReference)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Properties (java.util.Properties)1 mondrian.olap (mondrian.olap)1 Axis (mondrian.olap.Axis)1 MondrianException (mondrian.olap.MondrianException)1 Position (mondrian.olap.Position)1