Re: testing methods
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Sun, 30 Oct 2005 04:48:31 GMT
On Sun, 30 Oct 2005 01:01:01 GMT, "Michael" <mbialowas@xxxxxxx> wrote,
quoted or indirectly quoted someone who said :
>Hello all, I was wondering something. I am putting 4 methods into a class
>called MyUtils. Can I test these methods to make sure they work; if I create
>new new class files calling these methods. My question is , should it work
>if I place all files in same directory.
In a simple case, your test method can be the main method of the class
you are testing with the body of the method enclosed in:
if ( DEBUGGING )
where DEBUGGING is a static final boolean. This code has a dual
purpose of exercising the methods and showing some sample uses and
expected outputs.
For more complex classes, you use a tool like Junit.
See http://mindprod.com/jgloss/testing.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- References:
- testing methods
- From: Michael
- testing methods
- Prev by Date: Re: tictactoe
- Next by Date: Re: network is hindering my applet
- Previous by thread: testing methods
- Next by thread: Re: testing methods
- Index(es):