To be able to test your business objects layer in JUnit or TestNG test cases, you should set the following parameters in your test case/test suite launch configuration :
depending on if you are using normal or bundle-less builds.
A normal build means that you have checked the build option Generate bundles within the WOLips preferences.
First in the "Arguments" tab, set your working directory to the build product of your project. For example, for a framework project the working directory should be:
Select the "Java" folder of your build product.
If you are using bundle-less builds you don't have a build folder. You need to check the Generate bundles option in the preferences WOLips->Build and clean your project to get it generated.
Use the "Up/Down" buttons to move this folder at the first position of your classpath.
If during your tests execution you see error messages such as cannot cast EOGenericRecord to <your object> please check that the "Java" folder is at first position in your classpath entries.
The last step is to add the parameter -DNSProjectBundleEnabled=true to your VM parameters.
A bundle-less build means that you have unchecked the build option Generate bundles within the WOLips preferences.
That means that there will be no build folder in your project. In that case you must set the working directoy to the default:
On the classpath tab you don't need to add the "Java" folder of your build product so only the default classpath should be listed for the "User Entries". Be sure to add the parameter -DNSProjectBundleEnabled=true to your VM parameters as for normal builds.