use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class ExpressionTest method emptyList.
@Test
public void emptyList() {
Row row = new Row();
row.addColumn(-1, "chief", "duke");
Row execute = this.cut.execute(row, "$EMPTY");
assertTrue(execute.isEmpty());
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class ExpressionTest method accessToColumn.
@Test
public void accessToColumn() {
Row row = new Row();
final String inputValue = "duke";
row.addColumn(-1, "chief", inputValue);
Row result = this.cut.execute(row, "$EMPTY.addColumn(-1,'new_duke',chief.value + '_modified');$EMPTY;");
Column column = result.getColumnByName("new_duke");
assertNotNull(column);
Object value = column.getValue();
assertNotNull(value);
assertThat(value, is(inputValue + "_modified"));
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class ExpressionTest method bindingsAreWorking.
@Test
public void bindingsAreWorking() {
String expression = "print($ROW); print($ROW.numberOfColumns);$ROW";
Row row = new Row();
row.addColumn(-1, "chief", "duke");
row.addColumn(-1, "master", "juggy");
Row execute = this.cut.execute(row, expression);
assertFalse(execute.isEmpty());
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class FilterExpressionTest method drop.
@Test
public void drop() {
Boolean result = this.fe.execute(new Row(), "false");
assertFalse(result);
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class FilterExpressionTest method accept.
@Test
public void accept() {
Boolean result = this.fe.execute(new Row(), "true");
assertTrue(result);
}
Aggregations