Hello,
its a simple pojo:
package com.gp;
import java.util.ArrayList;
import java.util.List;
public class ClassB
{
List<String> items = new ArrayList<String>();
public void add(String s, int faktor)
{
for (int i = 0; i < faktor; i++)
{
items.add(s);
}
}
public List<String> getItems()
{
return items;
}
public void setItems(List<String> items)
{
this.items = items;
}
}
2012/2/15 Toni Rikkola <toni.rikkola(a)gmail.com>:
In the summary: "...was [[test1,test1]] expected
[[test1,test1]]"
Looks like it should work. Can you tell me more about ClassB. Is it a pojo or declared
model and is the field "items" a collection and what kind of?
Thanks
Toni
On Feb 15, 2012, at 10:07 AM, Péter Gombás wrote:
> Hi,
>
> still not working. Now i get even an error message (in attachment).
>
> Peter
>
> 2012/2/15 Toni Rikkola <toni.rikkola(a)gmail.com>:
>> Try =[test1,test1]
>>
>> Toni
>>
>> On Feb 15, 2012, at 9:47 AM, Michael Anstis wrote:
>>
>>
>> sent on the move
>>
>> ---------- Forwarded message ----------
>> From: "Péter Gombás" <gombas.peter(a)gmail.com>
>> Date: 15 Feb 2012 07:40
>> Subject: Re: [rules-users] Guvnor - expected value of a list
>> To: <michael.anstis(a)gmail.com>
>>
>> Hello Michael,
>>
>> yes, it is a Test scenario in Guvnor. In attachment is a very simple
>> project. Target is to check the resulting list. On the picture you can
>> see the problem: altough expected values are the same as target the
>> test is not succesful. Or am i using it not correctly?
>>
>> Peter
>>
>> 2012/2/14 Michael Anstis <michael.anstis(a)gmail.com>:
>>> I assume this is a QA \ Test Scenario in Guvnor?
>>>
>>> It's going to be helpful if you can provide an export of your repository
>>> (or
>>> an extract) showing the issue.
>>>
>>>
>>> On 14 February 2012 16:12, gombasp <gombas.peter(a)gmail.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I have the following problem: i would like to compare a value in
expected
>>>> section of a Guvnor test. Guvnor says actual value is:
>>>>
>>>> (Actual: [test1, test1])
>>>>
>>>> When i enter [test1, test1] to the expected value it will not match with
>>>> actual.
>>>> Is it possible to compare list values? If yes, what is the syntax?
>>>>
>>>> Thanks,
>>>>
>>>> Peter
>>>>
>>>> --
>>>> View this message in context:
>>>>
>>>>
http://drools.46999.n3.nabble.com/Guvnor-expected-value-of-a-list-tp37441...
>>>> Sent from the Drools: User forum mailing list archive at
Nabble.com.
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users(a)lists.jboss.org
>>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>>
>> --
>> Gombás Péter
>>
>>
<guvnor_test.zip><guvnor.JPG>_______________________________________________
>>
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
> --
> Gombás Péter
> <guvnor2.JPG>_______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users