Working with test client applications Using the test (Web hosting domain names)

Working with test client applications Using the test client application You can quickly add a declaration of a test client class to any class. 1 Display the class in which you want the declaration to appear in the editor. 2 Choose Enterprise|EJB|Use EJB Test Client. 3 If the test client already exists, check the EJB Test Client Class Already Exists option. If this option isn t checked, when you click Next, the EJB Test Client wizard starts. When you are through using it, the Use EJB Test Client wizard resumes. 4 Click Next to go to Step 2. 5 For the Class field, navigate to the test client class you want to use. 6 In the Field field, specify a name for the variable that will hold an instance of the test client class, or accept the default value the wizard suggests. 7 Choose Finish. The wizard adds a declaration of the test client application you specified to the class like this, for example: EmployeeTestClient1 employeeTestClient1 = new EmployeeTestClient1(); Now you re ready to call the methods declared in the test client application. Chapter 11: Running and testing an enterprise bean 95
Here java web hosting you will find professional-grade java web hosting at affordable prices.


Leave a Reply