Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.sun.javatest.lib.MultiTest

        com.sun.javatest.lib.MultiTest.SetupException
    • Field Summary

      • Fields inherited from class com.sun.javatest.lib.MultiTest

        excludeTestCases, log, ref, testArgTypes, testCases, testClass, testMethods
    • 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.getOutputStream
      com.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)  
      • Methods inherited from class com.sun.javatest.lib.MultiTest

        decodeAllArgs, decodeArg, getAllTestCases, getTestCase, init, init, invokeTestCase, reverse, run, run
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataHandler_Test

        public DataHandler_Test()
    • 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