hello, i'm not really familiar with junit4, so what are the good practice to write a gui test that verify some actions in the GUI. write the methode in Methode.java then write the testmethdoe in TestMethode.java? could you give me an example please ? thanks,
A:
For unit tests, one of the possible solutions is to have a different source folder.
so you have a folder called src/java or something like that for your code, and a folder src/tests for your unit tests.
Next, both of your folders can have the same package structure, and the class names in your test folder can be the original class name + Test
Next, a test class could contain the same methods as the original class, for which the names are again appended with the word Test
This gives you a good structure for your unit tests. Be aware that this is not the only possible solution, but just one I like to use...
Fortega
2010-10-08 10:35:27