use of main.Analyze.AnalyzePage in project Info-Evaluation by TechnionYP5777.
the class AnalyzePageTest method testInteractiveParagraph.
@Test
public void testInteractiveParagraph() {
List<InteractiveTableTuple> detailsTable = new AnalyzePage(text).getInteractiveDetails();
assertEquals(detailsTable.size(), 4);
assert "Soulja Boy".equals(detailsTable.get(2).getName());
boolean realReason = false;
for (ReasonPair ¢ : detailsTable.get(1).getReasons()) if ("driving under influence".equals(¢.getReason()))
realReason = true;
assert realReason;
assert "12/29/2013".equals(detailsTable.get(3).getDate());
}
use of main.Analyze.AnalyzePage 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