Search in sources :

Example 6 with Extractor

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

the class ExtractorTest method wikiIdTest.

@Ignore
@Test
public void wikiIdTest() {
    Extractor extr = new Extractor();
    extr.executeQuery(QueryTypes.WIKI_ID);
    assertEquals(extr.getResults().size(), ENTRIES_NUM);
}
Also used : Extractor(infoeval.main.WikiData.Extractor) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 7 with Extractor

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

the class ConnectorTest method wikiIdTableSizeTest.

@Ignore
@Test
public void wikiIdTableSizeTest() throws Exception {
    Connector conn = new Connector();
    assert conn.getConnection() != null;
    ArrayList<Row> rows = conn.runQuery("SELECT COUNT(*) FROM WikiID");
    Row row = rows.get(0);
    Entry<Object, Class> col = row.row.get(0);
    Object size = col.getValue().cast(col.getKey());
    assertEquals(ENTRIES_NUM, size);
    Extractor ext = new Extractor();
    ext.executeQuery(QueryTypes.WIKI_ID);
    assertEquals(ext.getResults().size(), size);
    conn.close();
}
Also used : Connector(infoeval.main.WikiData.Connector) Row(infoeval.main.mysql.Row) Extractor(infoeval.main.WikiData.Extractor) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Extractor (infoeval.main.WikiData.Extractor)7 Ignore (org.junit.Ignore)5 Test (org.junit.Test)5 QuerySolution (org.apache.jena.query.QuerySolution)3 ResultSetRewindable (org.apache.jena.query.ResultSetRewindable)3 RDFNode (org.apache.jena.rdf.model.RDFNode)3 Connector (infoeval.main.WikiData.Connector)2 Row (infoeval.main.mysql.Row)2 SqlTablesFiller (infoeval.main.WikiData.SqlTablesFiller)1 Date (java.sql.Date)1 ArrayList (java.util.ArrayList)1