Class getCommand_Test

  • All Implemented Interfaces:
    com.sun.javatest.Test

    public class getCommand_Test
    extends com.sun.javatest.lib.MultiTest
    Create a DataHandler object then use it to invoke getCommand() api, if this call returns a CommandInfo for specified command name, 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

        log, ref
    • Constructor Summary

      Constructors 
      Constructor Description
      getCommand_Test()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.sun.javatest.Status getCommandTest1()
      getCommandTest1: Test the behavior of the CommandMap wrapper calls when using the default command map.
      com.sun.javatest.Status getCommandTest2()
      getCommandTest2: Test the behavior of the CommandMap wrapper calls when using a custom CommandMap.
      static void main​(java.lang.String[] argv)  
      • Methods inherited from class com.sun.javatest.lib.MultiTest

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

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

      • getCommand_Test

        public getCommand_Test()
    • Method Detail

      • main

        public static void main​(java.lang.String[] argv)
      • getCommandTest1

        public com.sun.javatest.Status getCommandTest1()
        getCommandTest1: Test the behavior of the CommandMap wrapper calls when using the default command map. We need to have a know mapping to validate, so first, we install a default MailcapCommandMap and customize it with a distinctive mapping. We use the DataHandler(obj, mimetype) constructor here, in order to easily specify the mimetime that is the key to the distinctive mapping that we're providing.
        Returns:
        Status object
      • getCommandTest2

        public com.sun.javatest.Status getCommandTest2()
        getCommandTest2: Test the behavior of the CommandMap wrapper calls when using a custom CommandMap. For variation from the defaultCommandMapTest above, we'll use the DataHandler(DataSource) constructor. TestCommandMap will be configured to require the mimeType which is provided by the DataSource in order to function correctly.
        Returns:
        Status object