Пример #1
0
  public void testNestedOpenClose() {
    // Load the bridge
    Mama.loadBridge(Main.GetBridgeName());

    // Open mama
    Mama.open();

    // Open mama
    Mama.open();

    // Close mama
    Mama.close();

    // Close mama
    Mama.close();
  }
Пример #2
0
  public void testOpenCloseWithProperties() {
    // Load the bridge
    Mama.loadBridge(Main.GetBridgeName());

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

    // Close mama
    Mama.close();
  }
Пример #3
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);
  }