We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

thebugslayer on 06/03/07


Tagged

junit


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

bootz15


Quick Unit Testing


Published in: Groovy 


Groovy save you from using try/catch that expect exception in junit.


  1. class ConcurrentErrorTest extends GroovyTestCase {
  2. void testError(){
  3. def list = [1,2,3]
  4. list.eachWithIndex{e, i->
  5. list.remove(i)
  6. }
  7. }
  8. }
  9. }

Report this snippet 

You need to login to post a comment.