In Practice

The following unit testing tutorial helps you gain experience using JBuilder’s unit testing features. To learn more about the JUnit testing framework, visit www.junit.org.

The application’s goal is to unit test a class named FunctionalClass.

The exercise shows you how to set up a test case and a comparison test fixture.

Step 1: Opening the Unit Testing Sample Project

In this step, you open the sample project and the source code file that contains errors.

To open the example project, follow these steps:

1.
Select File, Open Project from the JBuilder menu.
2.
Locate the jbbook/ch05/UnitTestSample.jpx and click on OK.
3.
The project opens in the Project pane. The project is composed of five Java files:
  • FunctionalClass.java

Get Borland® JBuilder™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.