[jboss-jira] [JBoss JIRA] (DROOLS-1990) Test Scenarios: Editor not allowing selection from variable for field value, then corrupts value that I entered as literal after successful test run
Toni Rikkola (Jira)
issues at jboss.org
Fri Jan 11 10:18:01 EST 2019
[ https://issues.jboss.org/browse/DROOLS-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Toni Rikkola closed DROOLS-1990.
--------------------------------
Resolution: Explained
There will be a new test scenario editor to replace this editor.
> Test Scenarios: Editor not allowing selection from variable for field value, then corrupts value that I entered as literal after successful test run
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1990
> URL: https://issues.jboss.org/browse/DROOLS-1990
> Project: Drools
> Issue Type: Bug
> Components: Test Scenarios Editor
> Affects Versions: 5.5.0.Final
> Environment: Guvnor running under Tomcat (7, I think) on Windows XP dual core. Guvnor accessed via Firefox 3.x.
> Reporter: Chris Clark
> Assignee: Toni Rikkola
> Priority: Major
>
> I have an object mode written in Java and imported as a JAR file. The model contains the following (actual class names changed for clarity):
> interface FlyweightIndicator
> {
> String getCode();
> void setCode(String); // I'd prefer not to have this, but needed it for setting up my test case
> }
> abstract class AbstractFlyweightIndicator implements FlyweightIndicator
> {
> String code;
> // basic implementations for get/set Code
> }
> class ConcreteFlyweight extends AbstractFlyweightIndicator
> {
> ConcreteFlyweight()
> {
> code = "Something";
> }
> }
> class ReferencingClass
> {
> private FlyweightIndicator myInd;
> // standard implementations for get/set myInd
> // some other properties, some primitives, mostly Objects
> }
> I have a rule which which is supposed to fire when there is a ReferecingClass that has myInd set to a specific flyweight object.
> When I went to code the test case, I created a GIVEN instance of the ConcreteFlyweightClass [$fly] (and had to set the code, the constructor didn't seem to get called to set it?).
> Then I created another GIVEN for the ReferencingClass [$ref]. I added the myInd field.
> Problem #1
> Is that the editor won't give me the option to bind $fly to the field. I only get a text box.
> So I typed in "=$fly".
> The test case ran and it passed. Typing in $fly seems to have done what I wanted and set the variable.
> Problem #2
> Is that after the one successful run, the GIVEN section changed the myInd field to a dropdown, but it didn't include $fly as the value. When I clicked on the arrow beside the dropdown, $fly wasn't listed. So the field is now not set properly and the rule will fail with a null warning.
> I could live with having to type =$fly into the text box, although it should ideally allow me to bind to the variable. But having that removed and replaced with an empty dropdown makes the text case unusable. :(
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list