use of org.drools.workbench.models.commons.backend.rule.actions.TestIAction in project drools by kiegroup.
the class PluggableIActionTest method marshalPluggableIAction.
@Test
public void marshalPluggableIAction() {
RuleModel ruleModel = new RuleModel();
ruleModel.name = "TestIAction rule";
ruleModel.addRhsItem(new TestIAction());
String marshaledString = RuleModelDRLPersistenceImpl.getInstance().marshal(ruleModel);
assertEquals(DRL_RULE, marshaledString);
}
use of org.drools.workbench.models.commons.backend.rule.actions.TestIAction in project drools by kiegroup.
the class RuleModelDRLPersistenceExtensionsTest method unmarshalWithExtensions.
@Test
public void unmarshalWithExtensions() {
RuleModel ruleModel = RuleModelDRLPersistenceImpl.getInstance().unmarshal(DRL_RULE, Collections.emptyList(), new PackageDataModelOracleImpl(), Arrays.asList(new TestIActionPersistenceExtension()));
assertEquals(1, ruleModel.rhs.length);
IAction iAction = ruleModel.rhs[0];
assertTrue(iAction instanceof TestIAction);
}
use of org.drools.workbench.models.commons.backend.rule.actions.TestIAction in project drools by kiegroup.
the class RuleModelDRLPersistenceExtensionsTest method unmarshalDSLWithExtensions.
@Test
public void unmarshalDSLWithExtensions() {
RuleModel ruleModel = RuleModelDRLPersistenceImpl.getInstance().unmarshalUsingDSL(DSL_RULE, Collections.emptyList(), new PackageDataModelOracleImpl(), Arrays.asList(new TestIActionPersistenceExtension()));
assertEquals(1, ruleModel.rhs.length);
IAction iAction = ruleModel.rhs[0];
assertTrue(iAction instanceof TestIAction);
}
Aggregations