Wiki source code of Testing-JUnit

Version 5.1 by fjecker on 2009/05/19 06:39

Show last authors
1 = Testing with JUnit =
2
3 == Minor configuration in eclipse ==
4
5 To be able to test your business objects layer in JUnit test cases, you should set the following parameters in your test case/test suite launch configuration :
6 First in the //"Arguements"// tab, set your working directory to the build product of your project. For example, for a framework project the working directory should be :
7
8 {{noformat}}
9
10 ${workspace_loc:MyEclipseProject/build/MyEclipseProject.framework}
11
12 {{/noformat}}
13
14 For an application it should be (using the handy wolips//dir//loc variable)
15
16 {{noformat}}
17
18 ${working_dir_loc_WOLips:MyEcliseProject}
19
20 {{/noformat}}
21
22 Then, in the classpath tab, select the //"User Entries"// entry and use the //"Advanced..."// button and select the //"Add Folders"// button.
23 Select the //"Java"// folder of your build product.
24 Use the //"Up/Down"// buttons to move this folder at the first position of your classpath.
25
26 {{note title="Be Careful"}}
27
28 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.
29
30 {{/note}}