Search in sources :

Example 11 with CDatabase

use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.

the class PostgreSQLVerifyCalcTest method setUp.

@Before
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
    final String[] parts = CConfigLoader.loadPostgreSQL();
    m_database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_import", parts[1], parts[2], parts[3], false, false);
    m_database.connect();
    m_database.load();
}
Also used : CDatabase(com.google.security.zynamics.binnavi.Database.CDatabase) Before(org.junit.Before)

Example 12 with CDatabase

use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.

the class PostgreSQLVerifyNotepadTest method setUp.

@Before
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
    final String[] parts = CConfigLoader.loadPostgreSQL();
    m_database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_import", parts[1], parts[2], parts[3], false, false);
    m_database.connect();
    m_database.load();
}
Also used : CDatabase(com.google.security.zynamics.binnavi.Database.CDatabase) Before(org.junit.Before)

Example 13 with CDatabase

use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.

the class PostgreSQLConvertNotepadTest method setUp.

@Before
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
    final String[] parts = CConfigLoader.loadPostgreSQL();
    database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_import", parts[1], parts[2], parts[3], false, false);
    database.connect();
    database.load();
}
Also used : CDatabase(com.google.security.zynamics.binnavi.Database.CDatabase) Before(org.junit.Before)

Example 14 with CDatabase

use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.

the class PostgreSQLEmptyDatabaseTest method setUp.

@Test
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
    final String[] parts = CConfigLoader.loadPostgreSQL();
    final CDatabase database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_empty", parts[1], parts[2], parts[3], false, false);
    database.connect();
    database.load();
    database.close();
}
Also used : CDatabase(com.google.security.zynamics.binnavi.Database.CDatabase) Test(org.junit.Test)

Example 15 with CDatabase

use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.

the class CMain method prepareDatabaseConnections.

/**
   * Loads all database connections that are loaded automatically on startup.
   */
private static void prepareDatabaseConnections() {
    NaviLogger.info("Initializing database connections");
    // Read database information from the configuration file.
    final CDatabaseManager manager = CDatabaseManager.instance();
    for (final DatabaseConfigItem database : ConfigManager.instance().getDatabases()) {
        manager.addDatabase(new CDatabase(database.getDescription(), database.getDriver(), database.getHost(), database.getName(), database.getUser(), database.getPassword(), database.getIdentity(), database.isSavePassword(), database.isAutoConnect()));
    }
}
Also used : CDatabase(com.google.security.zynamics.binnavi.Database.CDatabase) DatabaseConfigItem(com.google.security.zynamics.binnavi.config.DatabaseConfigItem) CDatabaseManager(com.google.security.zynamics.binnavi.Database.CDatabaseManager)

Aggregations

CDatabase (com.google.security.zynamics.binnavi.Database.CDatabase)19 Before (org.junit.Before)13 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)3 Database (com.google.security.zynamics.binnavi.API.disassembly.Database)2 Module (com.google.security.zynamics.binnavi.API.disassembly.Module)2 TagManager (com.google.security.zynamics.binnavi.API.disassembly.TagManager)2 CDatabaseManager (com.google.security.zynamics.binnavi.Database.CDatabaseManager)2 SQLProvider (com.google.security.zynamics.binnavi.Database.Interfaces.SQLProvider)2 CTag (com.google.security.zynamics.binnavi.Tagging.CTag)2 CTagManager (com.google.security.zynamics.binnavi.Tagging.CTagManager)2 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)2 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)2 Tree (com.google.security.zynamics.zylib.types.trees.Tree)2 Field (java.lang.reflect.Field)2 Function (com.google.security.zynamics.binnavi.API.disassembly.Function)1 Instruction (com.google.security.zynamics.binnavi.API.disassembly.Instruction)1 View (com.google.security.zynamics.binnavi.API.disassembly.View)1 ViewContainer (com.google.security.zynamics.binnavi.API.disassembly.ViewContainer)1 MainWindow (com.google.security.zynamics.binnavi.API.gui.MainWindow)1 PluginInterface (com.google.security.zynamics.binnavi.API.plugins.PluginInterface)1