Search in sources :

Example 1 with RowTransformer

use of com.airhacks.enhydrator.transform.RowTransformer in project enhydrator by AdamBien.

the class PumpTest method postRowTransformerInitialization.

@Test
public void postRowTransformerInitialization() {
    Map<String, Object> bindings = new HashMap<>();
    bindings.put("date", new Date());
    RowTransformer transformer = mock(RowTransformer.class);
    Pump pump = new Pump.Engine().homeScriptFolder(EXISTING_HOME_FOLDER, bindings).endWith(transformer).build();
    verify(transformer).init(bindings);
}
Also used : HashMap(java.util.HashMap) RowTransformer(com.airhacks.enhydrator.transform.RowTransformer) Date(java.util.Date) Test(org.junit.Test)

Example 2 with RowTransformer

use of com.airhacks.enhydrator.transform.RowTransformer in project enhydrator by AdamBien.

the class PumpTest method preRowTransformerInitialization.

@Test
public void preRowTransformerInitialization() {
    Map<String, Object> bindings = new HashMap<>();
    bindings.put("date", new Date());
    RowTransformer transformer = mock(RowTransformer.class);
    Pump pump = new Pump.Engine().homeScriptFolder(EXISTING_HOME_FOLDER, bindings).startWith(transformer).build();
    verify(transformer).init(bindings);
}
Also used : HashMap(java.util.HashMap) RowTransformer(com.airhacks.enhydrator.transform.RowTransformer) Date(java.util.Date) Test(org.junit.Test)

Aggregations

RowTransformer (com.airhacks.enhydrator.transform.RowTransformer)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 Test (org.junit.Test)2