avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Testlet to JUnit conversions
Date Thu, 02 Aug 2001 14:42:20 GMT
On Fri,  3 Aug 2001 00:19, Berin Loritsch wrote:
> In order to convert all the testlets to JUnit TestCases,
> we need to do the following:
>
> 1) Change name from xxxTestlet to xxxTestCase (preferred but not necessary)
>
> 2) Change class extended from org.apache.testlet.AbstractTestlet to
>    junit.framework.TestCase
>
> 3) Global replace "assertEquality(" with "assertEquals("
>
> 4) Global replace "assert(" with "assertTrue(".  The assert() method works
>    but is deprecated in favor of the more semantically correct version.

I think it is more todo with jdk1.4 having assert as a keyword.

> Optionally:
>
> Place all initialization code in "setUp()" and disposal code in
> "tearDown()"

globally replace intialize() with setUp() and destroy() with tearDown() ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message