pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martini Sandro" <Sandro.Mart...@technomind.it>
Subject R: Annotations etc
Date Thu, 07 May 2009 09:06:26 GMT
Hi Greg,
 
> >we haven't a base class for Unit Testing, is time to write one ?
> 
> I don't think JUnit enforces any kind of base class, so I'm not sure we need one. Did
you have something specific in mind?
Ok, you have reason, JUnit 4 doesn't require a base class anymore (i was looking at my code
for JUnit 3.8.x).
 
But for some things could be useful, like having common methods to mask log infos in a consistent
way (instead of using System.out or for writing objects in the same format, etc), but i agree
that only for this a base class it would'n give us much gain.
 
But I'm thinking on my previuos mail, on the ability to tell via annotations to (optional)
check many things on resources at compile time (like wtkx files: existence, structure, availability
of classes and fields in Java Code referred from wtkx files, etc) ... instead of annotation
maybe a better place could be inside test classes, and maybe could be useful to have assertXxx()
methods dedicated to this ... et voilĂ , a base class for JUnit (in core/test/xxx,).
Then, i could create some Test methods (but this time with JUnit 4) for the demo I'm writing
for the Preferences for Pivot 1.3 .
 
And last, we could also create another base test class in wtk that extend ApplicationContext,
so we could use also it for other things (at the moment i imagine only run applications in
a different way, but it's not clear if/how useful) ... as experimental.
 
 
What do you think ? 
The "you" is for all Pivot Developers :-) ... suggestions / comments are always welcome, from
all.
 
Bye,
Sandro
 

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message