Exemplo n.º 1
0
  /**
   * Test to make sure you can get a single dimension in a cube.
   *
   * @throws SaikuOlapException
   */
  @Test
  public final void testGetDimensionNull() throws SaikuOlapException {
    List<SaikuCube> cubes = olapMetaExplorer.getAllCubes();

    SaikuDimension dim = olapMetaExplorer.getDimension(cubes.get(0), "No dimension");

    assertNull(dim);
  }
Exemplo n.º 2
0
 /**
  * Test what happens when you call an non existant connection.
  *
  * @throws SaikuOlapException
  */
 @Test
 public final void testGetConnectionFailure() throws SaikuOlapException {
   SaikuConnection output = null;
   try {
     output = olapMetaExplorer.getConnection("noname");
   } catch (Exception e) {
     // Connection Failure shouldn't throw an NPE it should throw a nicer error.
     assertEquals("Cannot find connection: (noname)", e.getMessage());
   }
   assertNull(output);
 }