[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1849) When creating a test scenario in the BRMS, it is not possible to link the facts through there fields

Nicolas Heron (JIRA) jira-events at lists.jboss.org
Thu Jan 22 08:36:44 EST 2009


    [ https://jira.jboss.org/jira/browse/JBRULES-1849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12449193#action_12449193 ] 

Nicolas Heron commented on JBRULES-1849:
----------------------------------------

Lets take this example 
when
    p : Person()
    c : Car (owner == p)
then
   Insurrance i = new Insurrace();
   i.setPerson(p)
   i.setCar(c);
  p.addInssurance(i);
end 


In fact, il is not possible to link facts 
1) in the given section
for the example above, I have to create a person, give him a variable name (aPerson) and then create a car (with variable name aCar) and set the owner field with the field name just create
also, in the given section, it is only possible to act on fieds of a class and not call a method of a class (or the only call works on fields)

2) in the expect section 
as you can see, i have to test the newly inssurance created is linked with the person (aPerson) and Car created before (aCar).
It is not possible to test if the inssurance was added to the person

> When creating a test scenario in  the BRMS, it is not possible to link the facts through there fields
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-1849
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-1849
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-guvnor
>    Affects Versions:  5.0.0.M2
>         Environment: Linux, Jboss 4.2.2
>            Reporter: Nicolas Heron
>            Assignee: Mark Proctor
>
> When creating a test scenario in  the BRMS, it is not possible to link the facts through there fields
> For example if I have a rule like : 
> when
>     p : Person()
>     c : Car (owner == p)
> then
> ...
> end
> in the test scenrio in the BRMS, I will never fire this rule. Indeed, I cannot through the BRMS affecting the owner of the car to the given person

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list