cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiang, Ning \(Willem\)" <Ning.Ji...@iona.com>
Subject RE: Junit 4 versus us
Date Tue, 20 Nov 2007 21:57:29 GMT
Hi Dan,

@BeforeClass just can be added before the static public method.
Maybe Benson want to do that thing in a non-static method.

Willem.


-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Wed 11/21/2007 5:33
To: cxf-dev@incubator.apache.org
Cc: Benson Margulies
Subject: Re: Junit 4 versus us
 

Umm...  

Couldn't it be in a @BeforeClass annotated method?   Why have the static 
things?

Dan


On Monday 19 November 2007, Benson Margulies wrote:
> And if one wants a protocol using overriden functions, one has to have
> an @Before that uses a static boolean to make it run once.
>
> > -----Original Message-----
> > From: Christopher Moesel [mailto:Christopher_Moesel@avid.com]
> > Sent: Monday, November 19, 2007 7:26 AM
> > To: cxf-dev@incubator.apache.org
> > Subject: RE: Junit 4 versus us
> >
> > Yes, I've found that any code I want only to run once (per
> > test class) needs to go in a static block outside the
> > constructor.  That way it only gets processed the first time
> > the JVM loads the class.
> >
> > -Chris
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bim2007@basistech.com]
> > Sent: Saturday, November 17, 2007 1:02 PM
> > To: cxf-dev@incubator.apache.org
> > Subject: Junit 4 versus us
> >
> >
> > We have a fair number of junit tests that have code in their
> > constructor
> > that should only be run once.
> >
> > Imagine my surprise to discover that this is really not a good idea,
> > since JUnit reconstructs for each test function.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog


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