use of main.database.DataList in project Info-Evaluation by TechnionYP5777.
the class GetCategoryTest method init.
@Before
public void init() throws Exception {
clearDB();
DataList lin = new DataList();
TableTuple t1 = new TableTuple("Austin Chumlee Russell", "01/09/2014", "driving without a licesnce");
t1.addKeyWord("driving license");
TableTuple t2 = new TableTuple("Austin Chumlee Russell", "01/09/2014", "driving without a licesnce");
t2.addKeyWord("driving license");
TableTuple t3 = new TableTuple("Chris Kattan", "02/10/2015", "attacking wife");
t3.addKeyWord("attacking");
TableTuple t4 = new TableTuple("Hugh Jackman", "02/12/2015", "drunk driving");
t4.addKeyWord("drunk driving");
TableTuple t5 = new TableTuple("Austin Chumlee Russell", "03/09/2013", "drunk driving");
t5.addKeyWord("drunk driving");
TableTuple t6 = new TableTuple("Ben Stiller", "02/12/2015", "driving without a licesnce");
t6.addKeyWord("driving license");
TableTuple t7 = new TableTuple("Emile Hirsch", "02/12/2015", "drunk driving");
t7.addKeyWord("drunk driving");
TableTuple t8 = new TableTuple("Chris Kattan", "01/23/2014", "attacking wife");
t8.addKeyWord("attacking");
TableTuple t9 = new TableTuple("Austin Chumlee Russell", "01/09/2014", "sexual assault");
t9.addKeyWord("assault");
TableTuple t10 = new TableTuple("Ben Stiller", "02/12/2015", "sexual assault");
t10.addKeyWord("assault");
lin.insert(t1);
lin.insert(t2);
lin.insert(t3);
lin.insert(t4);
lin.insert(t5);
lin.insert(t6);
lin.insert(t7);
lin.insert(t8);
lin.insert(t9);
lin.insert(t10);
addEvents(lin);
addAllKeywords(lin);
}
use of main.database.DataList in project Info-Evaluation by TechnionYP5777.
the class AnalyzePageTest method testBigParagraph.
@Test
public void testBigParagraph() {
DataList detailsTable = new AnalyzePage(text).getDetails();
assertEquals(detailsTable.getNumOfTuples(), 4);
ArrayList<TableTuple> details = detailsTable.getList();
assert "Tito Ortiz".equals(details.get(0).getName());
assert "driving under influence".equals(details.get(0).getReason());
assert "01/06/2016".equals(details.get(0).getDate());
assert "David Cassidy".equals(details.get(1).getName());
assert "driving under influence".equals(details.get(1).getReason());
assert "01/10/2016".equals(details.get(1).getDate());
assert "Soulja Boy".equals(details.get(2).getName());
assert "possession of gun".equals(details.get(2).getReason());
assert "01/22/2016".equals(details.get(2).getDate());
assert "12/29/2013".equals(details.get(3).getDate());
detailsTable = new AnalyzePage(text, "2014").getDetails();
details = detailsTable.getList();
assert "01/06/2014".equals(details.get(0).getDate());
assert "01/10/2014".equals(details.get(1).getDate());
assert "01/22/2014".equals(details.get(2).getDate());
assert "12/29/2013".equals(details.get(3).getDate());
}
Aggregations