cancel
Showing results for 
Search instead for 
Did you mean: 

2 data source - adding and deleting

New Contributor

2 data source - adding and deleting

Hi,
I am using two datasources, where i am adding a list in one, say "1,2,3,4,5", verifies in the wsdl and then deleting a couple of items, say "1,2,3" and verifying in the wsdl those items got deleted.  I created two datasources, with the following code
Add Lists:

def list = context.myList
if (list == null)
{
list = ["1", "2", "3", "4", "5"]
context.myList = list
}

if (!list.empty)
{
result.DeleteRList = list[0];
list.remove(0);
}

Delete List:

def list = context.myList
if (list == null)
{
list = ["1", "2", "3"]
context.myList = list
}

if (!list.empty)
{
result.DeleteRList = list[0];
list.remove(0);
}
But as I run my test, I keep getting a null pointer exception in DeleteList data source.  What am I doing wrong?

Thanks,
Tanvi
1 REPLY 1
Super Contributor

Re: 2 data source - adding and deleting

Hi,

hmm... could you attach (or mail to ole@eviware.com) your project so I can try to debug locally?

regards!

/Ole
eviware.com
New Here?
Join us and watch the welcome video:
Top Kudoed Authors