Forum Discussion
3 Replies
Sort By
- HimanshuTayalCommunity Hero
try to compare single item at once, hope you will find the error that way.
- JHuntCommunity Hero
Use in only to compare single items from a list. Use equals to compare the whole list, or assert that each item from the first list is in the second list.
def a = [1,2] def b = [1,2,3] def c = [[1,2],3] def d = [1,2] assert (a in c) assert !(a in b) a.each { assert it in b } assert a == d
- chathuradContributor
I was able to solve this issue by adding below aseertion.
log.info myList log.info cityList assert myList == cityList assert cityList.equals(myList)
Related Content
- 9 years ago
Recent Discussions
- 2 days ago