Originally posted by venkataramana raju:
can anybody tell me how to write junit test cases(i mean i have some java files , and i want to write junit tests with in separate package, now when ever i run my java files automaticly those tests should run) to do this what code i have to place in my java files???
Sorry, JUnit doesn't work that way. You'll have to
run your JUnit tests, not the production code.
It might help in getting started if you read the couple of short articles at
junit.sourceforge.net. Also, if you're using the Eclipse
IDE, there's a couple of tutorials on the topic
here and
here.