Something I've learned from the TDD stuff are "learning tests" - it's not
unit testing, but finding out how to make something work. When I need to
find something out or just a one-shot coding I'm tempted to use JUnit 4
tests:
public class Demo {
@Test
public void run() throws Exception {
... put your code here ...
}
}
The IDE provides the means to create the class source code by entering the
class name. And for test methods there are usually templates/shortcuts/...
to generate the method declaration code. You're fairly quickly set to type
in working code. Just fill in your code and press the Run button somewhere.
A nice added bonus is that each method is separate, so you can just add
methods to experiment other things. The IDE usually shows a nice overview of
the methods and does error handling.
--
You received this message because you are subscribed to the Google Groups "The
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.