Ejemplo n.º 1
0
  /** Rigourous Test :-) */
  public void testApp() throws SQLException {
    SharedVariables sharedVariables = SharedVariables.getInstance();

    assert (sharedVariables != null);

    testConnection(sharedVariables);
  }
Ejemplo n.º 2
0
  private void testConnection(SharedVariables sharedVariables) throws SQLException {
    SQLManagerInterface mySQLManager = SQLManagerFactory.getInstance(TableName.F2F);
    DataSourceManager dataSourceManager = DataSourceManager.getDataSourceManager();
    mySQLManager.setDataSourceManager(dataSourceManager);
    dataSourceManager.initialize();
    assert (mySQLManager.test(false));

    if (sharedVariables.isLocalDb()) {
      assert (mySQLManager.test(true));
    }
    dataSourceManager.closeAll();
  }