J2MEUnit Support in Mobility Pack
By lukas on Jul 22, 2006
How to Use It
If you want to use this feature just right click to class or package in Mobile project that you wanna generate the tests for. From popup menu choose Tools | Create JUnit Tests.
The dialog Create Tests appears. There is lot of options on that dialog. You can find more information about the options in the Help.
All the options in this dialog should work like when you generate normal junit tests. The test classes are generated with post fix Test into the same directory where are the tested classes.
When you generate tests then new TestRunner midlet is added automatically to your suite. The tests that will run are listed in JAD property J2MEUnitTestClasses.
Run Tests in Emulator
Following pictures show run of tests in emulator.
My Two Cents
Maybe you will be suprised like me that the test methods are generated with one missing capital letter in their name. E.g. for tested method myMethod you will get testmyMethod. I think that it should be testMyMethod. Well, it's minor issue that has to be decided till FCS. I reported a bug about it and we are now discussing it with Jirka. You can support me (or him) in the issue comments...
TOPICs: j2meunit mobility pack netbeans cldc midp