Unit Testing


To test the Airline Reservation application:

  1. Download and install the free implementation of the Jabber Server from the following URL:

    http://www.jabberstudio.org/projects/ejabberd/releases/view.php?id=610

  2. Download the free implementation of Java Document Object Model (JDOM) to read XML files from the following URL:

    http://www.jdom.org/

  3. Set the path of the bin directory of J2SDK by executing the following command at the command prompt:

     set path=%path%;D:\j2sdk1.4.0_02\bin; 
  4. Set the classpath of the lib directory of J2SDK and the jdom.jar file by executing the following command at the command prompt:

     set classpath=%classpath%;D:\j2sdk1.4.0_02\lib;D:\jdom.jar; 
  5. Copy the ReservationStatus.java, SocketClass.java, SocketConnector.java, ReservationResultTable.java, and XMLReader.java files to a folder on your computer. Use the cd command at the command prompt to move to the folder where you have copied the Java files. Compile the files by using the following javac command, as shown:

      javac *.java 
  6. To run the Airline Reservation application, specify the following command at the command prompt:

     java SocketConnector 
  7. The user interface of the Personal Information page appears.

  8. Enter information in the fields of the Personal Information page, as shown in Figure 6-6:

    click to expand: the figure shows the fields filled by the end user named john.
    Figure 6-6: Entering Personal Information

  9. Click OK to open the user interface of the Airline Reservation application.

  10. Select Chicago in the From combo box and Boston in the To combo box. Specify the Departure Date and Nationality, as shown in Figure 6-7:

    click to expand: this figure shows the information filled by the end user john to search for an airline schedule.
    Figure 6-7: Searching for an Airline Schedule

  11. Click the Search button to search for the specified airline schedule.

  12. Select the flight number usa10001 and select the Economy check box to reserve the airline schedule, as shown in Figure 6-8:

    click to expand: this figure shows the selected airline schedule for reservation.
    Figure 6-8: Reserving an Airline Schedule

  13. Click Submit to submit the reservation information. A confirmation dialog box appears.

  14. Click OK to return to the Airline Reservation window.




Developing Applications Using Jabber
Developing Applications Using Jabber
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 68

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net