From: David S. <da...@sa...> - 2011-06-20 19:58:03
|
On Fri, Jun 17, 2011 at 4:19 PM, Marius Kruger <am...@gm...> wrote: > On 16 June 2011 16:45, David Saff <da...@sa...> wrote: >> Marius, >> >> Thanks, now I understand where this is going. Genuinely sorry for the >> git busywork. I still don't know why the attachments aren't getting >> passed along. > > They were probably just a little too big and needed moderation. That's > why I mailed it to you directly too. > >> As to the feature itself, I'm confused--what's the cost of moving the >> non-parameterized tests to their own class? You can also use >> @RunWith(Enclosed.class) to have several inner classes, with different >> parameterizations, inside one file. > > In short that is not how I'd like to use it, is there any reason why > you don't want this feature? Parameterized.class currently allows one parameterization per test class. This patch enables two parameterizations, one of which must be the special case of "no parameters". A runner like JUnitParams (http://code.google.com/p/junitparams/) enables an arbitrary number of parameterizations, including "no parameters". I'd like to consider how to handle the arbitrary case, like JUnitParams, and would rather not create a special case for "no parameters" that users would need to migrate to the new framework when it's ready. Does that make sense? David Saff > I like to group tests that test the same functionality and require the > same setup in the same class. > So if it makes sense for some tests to run several times and some only once > and they all use the same setup, I'd like them in one class. > If there are one or two tests that does not need to execute multiple > times then I'll rather let them > execute multiple times than split them out into their own class > because they belong with the others. > But if it is easy to mark them to not execute multiple times then I > want to do that. > Multiple nested classes will be much uglier than a simple annotation, IMHO. > The first 3 classes that I wanted to use Parameterized on I also > wanted partially @NonParameterized. > I'd really rather have this in the core of junit in stead of > maintaining my own junit utils elsewhere. > > -- > thanks for listening :-) > <>< Marius ><> > |