use of edu.uci.ics.textdb.textql.statements.SelectStatement in project textdb by TextDB.
the class SelectStatementTest method testSelectStatementBeansBuilder01.
/**
* Test the correctness of the generated beans by a SelectStatement with a
* ProjectAllFieldsPredicate.
* Get a graph by calling getInternalPredicateBases() and getInternalLinkBeans()
* methods and check if the generated path form the node getInputNodeID() to
* the node getOutputNodeID() is correct. Also check whether getInputViews()
* is returning the correct dependencies.
*/
@Test
public void testSelectStatementBeansBuilder01() {
ProjectPredicate projectPredicate = new ProjectAllFieldsPredicate();
SelectStatement selectStatement = new SelectStatement("id", projectPredicate, null, "Table", null, null);
List<PredicateBase> expectedGeneratedBeans = Collections.emptyList();
List<String> dependencies = Arrays.asList("Table");
Assert.assertEquals(selectStatement.getInputViews(), dependencies);
StatementTestUtils.assertGeneratedBeans(selectStatement, expectedGeneratedBeans);
}
Aggregations