Search in sources :

Example 6 with Connector

use of infoeval.main.WikiData.Connector in project Info-Evaluation by TechnionYP5777.

the class ConnectorTest method connectionTest.

@Test
public void connectionTest() throws Exception {
    when(ds.getConnection()).thenReturn(connection);
    Connection connection = new Connector().getConnection();
    assert connection != null;
    connection.close();
}
Also used : Connector(infoeval.main.WikiData.Connector) Connection(java.sql.Connection) Test(org.junit.Test)

Example 7 with Connector

use of infoeval.main.WikiData.Connector in project Info-Evaluation by TechnionYP5777.

the class SqlTablesFillerTest method basicInfoTableSizeTest.

@Ignore
@Test
@SuppressWarnings("rawtypes")
public void basicInfoTableSizeTest() throws Exception {
    Row row = new Connector().runQuery("SELECT COUNT(*) FROM basic_info").get(0);
    Entry<Object, Class> col = row.row.get(0);
    assertEquals(ENTRIES_NUM - 1, (long) col.getValue().cast(col.getKey()));
}
Also used : Connector(infoeval.main.WikiData.Connector) AfterClass(org.junit.AfterClass) BeforeClass(org.junit.BeforeClass) Row(infoeval.main.mysql.Row) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Connector (infoeval.main.WikiData.Connector)7 Test (org.junit.Test)7 Row (infoeval.main.mysql.Row)6 Ignore (org.junit.Ignore)4 Extractor (infoeval.main.WikiData.Extractor)2 AfterClass (org.junit.AfterClass)2 BeforeClass (org.junit.BeforeClass)2 Connection (java.sql.Connection)1