[jboss-jira] [JBoss JIRA] (DROOLS-691) Workflow Test Scenario error: org.foo.Bar cannot be cast to org.foo.Bar

Jozef Marko (JIRA) issues at jboss.org
Mon Jul 16 16:08:00 EDT 2018


     [ https://issues.jboss.org/browse/DROOLS-691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jozef Marko updated DROOLS-691:
-------------------------------
    Component/s: Test Scenarios Editor


> Workflow Test Scenario error: org.foo.Bar cannot be cast to org.foo.Bar
> -----------------------------------------------------------------------
>
>                 Key: DROOLS-691
>                 URL: https://issues.jboss.org/browse/DROOLS-691
>             Project: Drools
>          Issue Type: Bug
>          Components: Test Scenarios Editor
>    Affects Versions: 6.1.0.Final
>            Reporter: Rares Vernica
>            Assignee: Toni Rikkola
>
> This is a bug with Workflow Test Scenario. I have two types:
> org.foo.Bar
>   goz
> org.foo.Goz
>   g1
>   g2
> Bar has a member of type Goz called goz. Goz has two members g1 and g2 which have predefined values in an enumeration and g2 depends on the value of g1. I have a rule using them and the rule is fine.
> The problem is when I create a Test Scenario using them. The scenario has Goz and a Bar in the GIVEN section. Both are blinded to variable names and the goz member of Bar is initialized with the Goz instance.
> I first create Goz in the GIVEN section. I add g1 and g2 and assign literal values to them.
> Then I create Bar in the given section as well. Without any further changes I "Run scenario" and I get:
> Reporting:
> There were test failures
> 	Text
> Test : org.foo.Bar cannot be cast to org.foo.Bar
> It might be relate to DROOLS-689 which I reported earlier.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list