Search in sources :

Example 16 with TableEntry

use of infoeval.main.mysql.TableEntry in project Info-Evaluation by TechnionYP5777.

the class TableEntryTest method test3.

@Test
@SuppressWarnings("deprecation")
public void test3() {
    TableEntry te = new TableEntry();
    te.setUrl("url");
    te.setName("name");
    te.setDeathPlace("deathPlace");
    te.setBirthPlace("birthPlace");
    te.setBirthDate(new Date(2000, 10, 21));
    te.setDeathDate(new Date(2015, 10, 21));
    te.setOccupation("Politician");
    assertEquals(te.getBirthDate(), new Date(2000, 10, 21));
    assertEquals(te.getDeathDate(), new Date(2015, 10, 21));
    assertEquals("Politician", te.getOccupation());
    assertEquals("birthPlace", te.getBirthPlace());
    assertEquals("deathPlace", te.getDeathPlace());
    assertEquals("url", te.getUrl());
    assertEquals("name", te.getName());
}
Also used : TableEntry(infoeval.main.mysql.TableEntry) Date(java.sql.Date) Test(org.junit.Test)

Example 17 with TableEntry

use of infoeval.main.mysql.TableEntry in project Info-Evaluation by TechnionYP5777.

the class TableEntryTest method test2.

@Test
@SuppressWarnings("deprecation")
public void test2() {
    TableEntry te = new TableEntry("url", "name", "birthPlace", "deathPlace", new Date(2000, 10, 21), new Date(2015, 10, 21), "", "", "", "", "", "", "");
    assertEquals(te.getBirthDate(), new Date(2000, 10, 21));
    assertEquals(te.getDeathDate(), new Date(2015, 10, 21));
    assertEquals("birthPlace", te.getBirthPlace());
    assertEquals("deathPlace", te.getDeathPlace());
    assertEquals("url", te.getUrl());
    assertEquals("name", te.getName());
}
Also used : TableEntry(infoeval.main.mysql.TableEntry) Date(java.sql.Date) Test(org.junit.Test)

Aggregations

TableEntry (infoeval.main.mysql.TableEntry)17 Test (org.junit.Test)12 SimpleDateFormat (java.text.SimpleDateFormat)6 Date (java.sql.Date)5 SqlRunner (infoeval.main.mysql.SqlRunner)2 IOException (java.io.IOException)2 SQLException (java.sql.SQLException)2 ParseException (java.text.ParseException)2 ArrayList (java.util.ArrayList)2 QuerySolution (org.apache.jena.query.QuerySolution)2 ResultSetRewindable (org.apache.jena.query.ResultSetRewindable)2 RDFNode (org.apache.jena.rdf.model.RDFNode)2 Ignore (org.junit.Ignore)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 Extractor (infoeval.main.WikiData.Extractor)1 Row (infoeval.main.mysql.Row)1