use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class PojoSinkTest method pojoWithRelation.
@Test
public void pojoWithRelation() {
final String expected = "duke";
Row parent = new Row();
parent.addColumn(-1, "name", expected);
final int expectedRanking = 2;
final String expectedLanguageName = "java";
Row programming = new Row();
programming.addColumn(-1, "name", expectedLanguageName);
programming.addColumn(-1, "ranking", expectedRanking);
parent.add(programming);
this.cut.processRow(parent);
Developer developer = getDeveloper();
assertNotNull(developer);
assertThat(developer.getLanguages().size(), is(1));
ProgrammingLanguage language = developer.getLanguages().iterator().next();
assertThat(language.getName(), is(expectedLanguageName));
assertThat(language.getRanking(), is(expectedRanking));
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class ScriptableSinkTest method instantiate.
@Test
public void instantiate() throws IOException {
try (ScriptableSink sink = new ScriptableSink("./src/test/scripts/sink.js")) {
sink.init();
sink.processRow(new Row());
}
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class TestRows method getStringRow.
public static Row getStringRow() {
Row row = new Row();
row.addColumn(0, "a", "java");
row.addColumn(1, "b", "tengah");
return row;
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class TestRows method getIntRow.
public static Row getIntRow() {
Row row = new Row();
row.addColumn(0, "a", "1");
row.addColumn(1, "b", "2");
return row;
}
use of com.airhacks.enhydrator.in.Row in project enhydrator by AdamBien.
the class CSVFileSinkTest method getEntries.
Row getEntries() {
Row row = new Row();
Column e = new Column(5, "Column Five (empty)", null);
row.addColumn(e);
row.addColumn(2, "Column Two", "tengah");
row.addColumn(4, "Column Four", "groovy");
row.addColumn(1, "Column One", "java");
Column c = new Column(3, "Column Three (empty)", null);
row.addColumn(c);
return row;
}
Aggregations