Search in sources :

Example 1 with ConditionLoadSaveValidator

use of org.pentaho.di.trans.steps.loadsave.validator.ConditionLoadSaveValidator in project pentaho-kettle by pentaho.

the class FilterRowsMetaTest method setUpLoadSave.

@Before
public void setUpLoadSave() throws Exception {
    KettleEnvironment.init();
    PluginRegistry.init(false);
    List<String> attributes = Arrays.asList("condition", "send_true_to", "send_false_to");
    Map<String, String> getterMap = new HashMap<String, String>();
    Map<String, String> setterMap = new HashMap<String, String>();
    Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
    attrValidatorMap.put("condition", new ConditionLoadSaveValidator());
    attrValidatorMap.put("trueStepName", new StringLoadSaveValidator());
    attrValidatorMap.put("falseStepname", new StringLoadSaveValidator());
    getterMap.put("send_true_to", "getTrueStepname");
    setterMap.put("send_true_to", "setTrueStepname");
    getterMap.put("send_false_to", "getFalseStepname");
    setterMap.put("send_false_to", "setFalseStepname");
    Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
    loadSaveTester = new LoadSaveTester(testMetaClass, attributes, getterMap, setterMap, attrValidatorMap, typeValidatorMap);
}
Also used : ConditionLoadSaveValidator(org.pentaho.di.trans.steps.loadsave.validator.ConditionLoadSaveValidator) HashMap(java.util.HashMap) LoadSaveTester(org.pentaho.di.trans.steps.loadsave.LoadSaveTester) FieldLoadSaveValidator(org.pentaho.di.trans.steps.loadsave.validator.FieldLoadSaveValidator) StringLoadSaveValidator(org.pentaho.di.trans.steps.loadsave.validator.StringLoadSaveValidator) Before(org.junit.Before)

Example 2 with ConditionLoadSaveValidator

use of org.pentaho.di.trans.steps.loadsave.validator.ConditionLoadSaveValidator in project pentaho-kettle by pentaho.

the class JoinRowsMetaTest method setUpLoadSave.

@Before
public void setUpLoadSave() throws Exception {
    KettleEnvironment.init();
    PluginRegistry.init(false);
    List<String> attributes = Arrays.asList("directory", "prefix", "cacheSize", "mainStepname", "condition");
    Map<String, String> getterMap = new HashMap<String, String>();
    Map<String, String> setterMap = new HashMap<String, String>();
    Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
    attrValidatorMap.put("condition", new ConditionLoadSaveValidator());
    Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
    loadSaveTester = new LoadSaveTester(testMetaClass, attributes, getterMap, setterMap, attrValidatorMap, typeValidatorMap);
}
Also used : ConditionLoadSaveValidator(org.pentaho.di.trans.steps.loadsave.validator.ConditionLoadSaveValidator) HashMap(java.util.HashMap) LoadSaveTester(org.pentaho.di.trans.steps.loadsave.LoadSaveTester) FieldLoadSaveValidator(org.pentaho.di.trans.steps.loadsave.validator.FieldLoadSaveValidator) Before(org.junit.Before)

Aggregations

HashMap (java.util.HashMap)2 Before (org.junit.Before)2 LoadSaveTester (org.pentaho.di.trans.steps.loadsave.LoadSaveTester)2 ConditionLoadSaveValidator (org.pentaho.di.trans.steps.loadsave.validator.ConditionLoadSaveValidator)2 FieldLoadSaveValidator (org.pentaho.di.trans.steps.loadsave.validator.FieldLoadSaveValidator)2 StringLoadSaveValidator (org.pentaho.di.trans.steps.loadsave.validator.StringLoadSaveValidator)1