Consider a company that wants to keep track of its employees, their positions and their telephone numbers. Your development team has developed a simple prototype using the Java code found in EmployeeDirectory.zip. In the lib directory is a jar file that must be in the Java classpath in order for the code to compile and run. In the res directory are sample input files containing employee and phone records.
1) Use jUnit to write thorough unit tests for the Phone and Employee classes. Do not put test code in the src directory, instead, create a separate test directory.
2) The provided Ant script build.xml contains the following targets:
- init (does preliminaries for build)
- compile (compiles the application code and puts it into build directory)
- dist (default(target, generates the application distribution jar, places this and supporting data files in dist directory)
- clean (deletes any directories and files created during build activities)
Modify build.xml to provide the following additional targets (be sure to update clean accordingly):
a) test (compiles and runs the jUnit tests you have created, depends on compile)
b) doc (generates the application code's javadoc and puts it into a doc directory)
Resources
https://github.com/junitQteam/junit/wiki
https://ant.apache.org/manual/
Attachment:- ASSIGNMENT.rar