1 17 package org.alfresco.repo.action; 18 19 import org.alfresco.service.cmr.rule.RuleServiceException; 20 21 22 25 public class ActionConditionDefinitionImplTest extends BaseParameterizedItemDefinitionImplTest 26 { 27 30 private static final String CONDITION_EVALUATOR = "conditionEvaluator"; 31 32 35 protected ParameterizedItemDefinitionImpl create() 36 { 37 try 39 { 40 ActionConditionDefinitionImpl temp = new ActionConditionDefinitionImpl(NAME); 41 temp.setParameterDefinitions(this.duplicateParamDefs); 42 fail("Duplicate param names are not allowed."); 43 } 44 catch (RuleServiceException exception) 45 { 46 } 48 49 ActionConditionDefinitionImpl temp = new ActionConditionDefinitionImpl(NAME); 51 assertNotNull(temp); 52 temp.setParameterDefinitions(this.paramDefs); 55 temp.setConditionEvaluator(CONDITION_EVALUATOR); 56 return temp; 57 } 58 59 62 public void testGetConditionEvaluator() 63 { 64 ActionConditionDefinitionImpl cond = (ActionConditionDefinitionImpl)create(); 65 assertEquals(CONDITION_EVALUATOR, cond.getConditionEvaluator()); 66 } 67 } 68 | Popular Tags |