ACMNexus / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

Do you plan to provide a function that always throws an exception for unit testing ? #164

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Do you plan to provide a function that always throws an exception for unit
testing ? (like apache commons)

How do you test this kind of behavior ?

May be in this could be added in a google-collections-test jar ?

Regards,

Original issue reported on code.google.com by amer...@gmail.com on 11 May 2009 at 9:07

GoogleCodeExporter commented 8 years ago
I don't expect we'd add that.  I don't really want to promote the idea that 
Function
is a good abstraction for an operation that might throw an exception.  Anyway, 
it's
extremely easy for any user to write.

Original comment by kevin...@gmail.com on 11 May 2009 at 5:10

GoogleCodeExporter commented 8 years ago

Original comment by kevin...@gmail.com on 28 May 2009 at 7:05

GoogleCodeExporter commented 8 years ago
I agree.

Original comment by amer...@gmail.com on 28 May 2009 at 7:20