Example #1
0
  public void testOpenClose() {
    // Load the bridge
    Mama.loadBridge(Main.GetBridgeName());

    // Open mama
    Mama.open();

    // Close mama
    Mama.close();
  }
Example #2
0
  public void testOpenCloseWithProperties() {
    // Load the bridge
    Mama.loadBridge(Main.GetBridgeName());

    // Open mama
    Mama.open("", "mama.properties");

    // Close mama
    Mama.close();
  }
Example #3
0
 @Override
 protected void tearDown() throws Exception {
   super.tearDown();
   framework.stop();
   IO.delete(tmp);
   Main.stop();
   IO.delete(IO.getFile("generated/cache"));
   IO.delete(IO.getFile("generated/storage"));
   framework.waitForStop(100000);
   super.tearDown();
 }
Example #4
0
  public void testOpenCloseReopenSameBridge() {
    // Load the bridge
    Mama.loadBridge(Main.GetBridgeName());

    // Open mama
    Mama.open();

    // Close mama
    Mama.close();

    // Open again, this will cause an error as the bridge has not been re-loaded
    try {
      Mama.open();
    } catch (MamaException except) {
      return;
    }

    // If we get here there is a problem
    assertTrue(true);
  }