Creating a Java JUnit Testing Project

You need to create a Java JUnit testing project to test the newly created COBOL JVM wrapper project. The following is a list of test cases that you might want to create:

  1. Test connection is open/closed.
  2. Create a record.
  3. Update the record.
  4. Create a second record.
  5. Delete the first record.
  6. Delete the second record.
  7. Verify the record content after steps 2 through 6.

You can use the project from the sample folder:

  1. In the COBOL Explorer, click File > Import.

    This opens the Import dialog box.

  2. Click General > Existing Projects into Workspace.
  3. Click Next.
  4. Click Browse next to the Select root directory field.

    This opens the Browse For Folder dialog box.

  5. Navigate to the Eclipse\jvm_cobol\AddressBookDemo\addressBookWrapperTest folder in the samples directory installed with Visual COBOL, which by default is $COBDIR/demo.
  6. Click OK.
  7. In the Projects list, ensure that the addressBookWrapperTest is checked.
  8. Check the Copy projects into workspace.
  9. Click Finish.
Note: You need to add the COBOL JVM Runtime System to the projects libraries to run the tests.