Hi John and Edinson,

Thank you very much for the suggestion of using flag, and a list. They work well for the main Test Case

Many thanks,

lea

 

From: John Wagenleitner [mailto:john.wagenleitner@gmail.com]
Sent: Tuesday, 12 January 2016 3:04 p.m.
To: users@groovy.apache.org
Subject: Re: "continue" does not continue the while loop after an assertion fails

 

Could also put the text you were using in the asserts into a List instead and after the while loop assert list isEmpty().

On Jan 11, 2016 5:28 PM, "Edinson E. Padrón Urdaneta" <edinson.padron.urdaneta@gmail.com> wrote:

​​

​​

I don't really know what are your intentions, so I gonna try to guess and help you if I can:

If you are trying to test every element in `exlusionList`, you don't want to stop the execution until the last one has been tested, and you want the test to fail if at least one element failed, you can use a flag to help you with that. Set the flag if the assertion failed at least once, and if the flag was set (it's true, for example) you can throw an exception to make the test fail as a whole.

**********************************************************************
This electronic email and any files transmitted with it are intended
solely for the use of the individual or entity to whom they are addressed.

The views expressed in this message are those of the individual sender
and may not necessarily reflect the views of the Christchurch City Council.

If you are not the correct recipient of this email please advise the
sender and delete.

Christchurch City Council
http://www.ccc.govt.nz
**********************************************************************