On 14 Dec 2002 at 0:43, Jordi Salvat i Alabart wrote:

> I'm almost done on this. Many unit tests use 'non-core' components just 
> as "examples" of components of their type. I've reviewed the tests one 
> by one to use 'stub' components instead, which I define as inner classes 
> in the tests themselves. I've replaced some other tests with completely 
> new ones, which I believe to be equally reliable.

Yup.  I was too lazy to do that much work :-)

> 
> I also thought about creating a separate "test" section (at the same 
> level as jorphan/core/components/etc.) to contain all the test code, but 
> I feel this would make test creation/review a longer task. Also, it 
> wouldn't provide people creating new components such a clear hint on how 
> to create tests (and the convenience to do it).

I think unit tests as inner classes are the best way.  Although is has the 
disadvantage 
that the unit tests may create dependencies you wouldn't normally want, the advantages 
are numerous:

1.  Testing private methods is easy
2.  The unit tests travel with the class.  If someone wants to use the class 
elsewhere, the 
unit tests go with it.  Even if they need modification, this if beneficial.
3.  Like you said, easier to review, more visible, and I think people are more 
inclined to 
write them when they see the inner class already there.  It's too easy to just ignore 
that 
whole /unittest/ directory.

-Mike
> 
> I'll see what I can do with that command line tool...
> 
> Salut,
> 
> Jordi.
> 
> 
> Mike Stover wrote:
> > I think this is a reasonable solution to the problem.  The unit tests are the 
>other big 
> > obstacle to completing the separation I was trying to achieve, and I'd be 
>interested 
> > to know what you're planning, Jordi.
> > 
> > -Mike
> > 
> > 
> > On 13 Dec 2002 at 12:05, Wolfram Rittmeyer wrote:
> > 
> > 
> >>Hi Jordi,
> >>
> >>hm, seems as if I am not up to date. How old are "legacy testplans"? Phew, I
> >>guess I have to update my JMeter-knowledge ;-)
> >>
> >>Anyway: Would there be a possibility for a small command-line tool which
> >>converts testplans. So this one could be developed once and its sources then
> >>published on the JMeter-site. But the sources of this tool would afterwards
> >>be no longer part of the CVS-tree and part of the development of JMeter. In
> >>general I like your proposal of a clean separation.
> >>
> >>Greetings,
> >>
> >>Wolfram
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >>
> > 
> > 
> > 
> > --
> > Michael Stover
> > [EMAIL PROTECTED]
> > Yahoo IM: mstover_ya
> > ICQ: 152975688
> > AIM: mstover777
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to