Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-691

Workflow Test Scenario error: org.foo.Bar cannot be cast to org.foo.Bar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 6.1.0.Final
    • Test Scenarios Editor
    • None

      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.

              trikkola Toni Rikkola
              rvernica Rares Vernica (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: