Beispiel #1
0
  /**
   * Test that you can get a single connection.
   *
   * @throws SaikuOlapException
   */
  @Test
  public final void testGetConnectionSuccess() throws SaikuOlapException {
    SaikuConnection output = olapMetaExplorer.getConnection("test");

    assertNotNull(output);

    assertEquals("test", output.getName());
  }
Beispiel #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);
 }