Class DataHandler_Test
- java.lang.Object
-
- com.sun.javatest.lib.MultiTest
-
- javasoft.sqe.tests.api.javax.activation.DataHandler.DataHandler_Test
-
- All Implemented Interfaces:
com.sun.javatest.Test
public class DataHandler_Test extends com.sun.javatest.lib.MultiTest
Invoke all constructors to create DataHandler objects. If these operations are successfull then this testcase passes otherwise it fails.
-
-
Constructor Summary
Constructors Constructor Description DataHandler_Test()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.sun.javatest.Status
dataHandlerTest1()
dataHandlerTest1: a contructor test for DataHandler(DataSource);com.sun.javatest.Status
dataHandlerTest2()
dataHandlerTest2: test a contructor DataHandler(String, String);com.sun.javatest.Status
dataHandlerTest3()
dataHandlerTest3: attempt to construct a DataSource that cannot provide an output stream test for appropriate exception from DataHandler.getOutputStreamcom.sun.javatest.Status
dataHandlerTest4()
dataHandlerTest4: attempt to constrcut a DataSource that cannot provide an input stream test for appropriate exception from DataHandler.getInputStream, writeTo (which copies getInputStream to the provide OutputStream.com.sun.javatest.Status
dataHandlerTest5()
dataHandlerTest5: Test the DataHandler(URL) constructor.static void
main(java.lang.String[] argv)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] argv)
-
dataHandlerTest1
public com.sun.javatest.Status dataHandlerTest1()
dataHandlerTest1: a contructor test for DataHandler(DataSource);- Returns:
- Status object
-
dataHandlerTest2
public com.sun.javatest.Status dataHandlerTest2()
dataHandlerTest2: test a contructor DataHandler(String, String);- Returns:
- Status object
-
dataHandlerTest3
public com.sun.javatest.Status dataHandlerTest3()
dataHandlerTest3: attempt to construct a DataSource that cannot provide an output stream test for appropriate exception from DataHandler.getOutputStream- Returns:
- Status object
-
dataHandlerTest4
public com.sun.javatest.Status dataHandlerTest4() throws java.io.IOException
dataHandlerTest4: attempt to constrcut a DataSource that cannot provide an input stream test for appropriate exception from DataHandler.getInputStream, writeTo (which copies getInputStream to the provide OutputStream.- Returns:
- Status object
- Throws:
java.io.IOException
- never
-
dataHandlerTest5
public com.sun.javatest.Status dataHandlerTest5() throws java.io.IOException
dataHandlerTest5: Test the DataHandler(URL) constructor. This is just a convenience for DataHandler(new URLDataSource(URL)). Since DataHandler's correct use of DataSource is validated using FileDataSource, here we just verify that getDataSource produces an URLDataSource instance with the correct URL in it.- Returns:
- Status object
- Throws:
java.io.IOException
- never
-
-