Rational QualityArchitect/Java API
Version 1.0

com.rational.test.vp
Interface VerificationPointData

All Known Implementing Classes:
DatabaseVPData

public interface VerificationPointData

A class implementing this interface encapsulates and serializes a single snapshot of either expected or actual data. It can be populated through the captureData method of a Verification Point Data Provider class, or it can be populated manually in the test script -- for example, by literal values or by values from a datapool.

Each implementation of the VerificationPointData interface is required to provide its own serialization methods. This allows for support of all possible file formats. Use the readFile() and writeFile() methods to implement serialization for the encapsulated data.

Note: For the current Rational QualityArchitect release, Verification Point Data classes must serialize to a .CSV file format. This restriction will be removed in a future release of Rational QualityArchitect.

In addition to implementing the methods defined by this interface, all Verification Point Data classes should create member variables that encapsulate the data being compared by the verification point. The data encapsulated in these member variables should be exposed through public get... and set... methods that you implement, thereby allowing a test script to create and populate an instance of the class for use in dynamic and manual verification points.

The VerificationPointData interface is part of the verification point framework that you use to implement your own verification point classes. The verification point framework also includes:

Since:
QualityArchitect 0.1
See Also:
Implementing a New Verification Point

Method Summary
 java.lang.String getFileExtension()
          This method returns the extension of the file used to store the data object.
 void readFile(java.io.InputStream in)
          This method reads the expected or actual data object from the specified InputStream.
 void writeFile(java.io.OutputStream out)
          This method writes the expected or actual data object to the specified OutputStream.
 

Method Detail

getFileExtension

public java.lang.String getFileExtension()

This method returns the extension of the file used to store the data object. The framework uses the file extension to determine the type of file format to use when it serializes files (for example, a CSV extension indicates a comma-separated-value text file).

Note: In the current release, CSV is the only supported file format. Other formats will be supported in future releases.

Returns:
The extension of the file used to store the data object.

readFile

public void readFile(java.io.InputStream in)
              throws java.io.IOException,
                     java.lang.ClassNotFoundException

This method reads the expected or actual data object from the specified InputStream.

Parameters:
in - The InputStream from which the object is read.
Throws:
java.io.IOException - An input/output error has occurred.

writeFile

public void writeFile(java.io.OutputStream out)
               throws java.io.IOException

This method writes the expected or actual data object to the specified OutputStream.

Parameters:
out - The OutputStream to which the object is written.
Throws:
java.io.IOException - An input/output error has occurred.

30-Jun-2003

Rational QualityArchitect/Java Support Home Page
Copyright (c) 2000, Rational Software Corporation