[jboss-jira] [JBoss JIRA] (DROOLS-2010) Add queries w/assign variables in "Expect" section of Test Scenario editor
Michael Anstis (JIRA)
issues at jboss.org
Fri Oct 27 05:00:11 EDT 2017
[ https://issues.jboss.org/browse/DROOLS-2010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Anstis moved GUVNOR-3149 to DROOLS-2010:
------------------------------------------------
Project: Drools (was: Guvnor)
Key: DROOLS-2010 (was: GUVNOR-3149)
Workflow: GIT Pull Request workflow (was: classic default workflow)
Issue Type: Enhancement (was: Feature Request)
Component/s: Test Scenarios Editor
(was: Test Scenarios)
Affects Version/s: 6.5.0.Final
(was: drools_6.5.0.Final)
> Add queries w/assign variables in "Expect" section of Test Scenario editor
> --------------------------------------------------------------------------
>
> Key: DROOLS-2010
> URL: https://issues.jboss.org/browse/DROOLS-2010
> Project: Drools
> Issue Type: Enhancement
> Components: Test Scenarios Editor
> Affects Versions: 6.5.0.Final
> Environment: Tomcat 9 (CLI), Win7 x64, Google Chrome
> Reporter: Russell Morrisey
> Assignee: Toni Rikkola
>
> In the Test Scenario editor, I want to be able to set up "Expect" clauses that chain together, like this:
> {code:java}
> $r1: A fact of type FieldValidation has values:
> - fieldCode = "countryCode"
> A fact of type FactAttributeValue has values:
> - fieldValidation = $r1
> - type = "allowedValue"
> - value = "US"
> {code}
> In this case, I want to query for the 1st object, store it in a variable, and use the variable value to verify the 2nd clause of the test. This is necessary to verify relationships between objects, such as master-detail relationships. It seems like the current Test Scenario editor interface does not support this.
> The following rule snippet produces facts like those above, which seem untestable in the current Test Scenario editor:
> {code:java}
> when
> ...
> then
> FieldValidation $r1 = new FieldValidation("countryCode")
> insertLogical( $r1 )
> insertLogical( new FactAttributeValue($r1, "allowedValue", "US") )
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list