Class listSubscribed_Test

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

    public class listSubscribed_Test
    extends MailTest
    This class tests the listSubscribed(..) API. It does this by invoking api under test and then checking the value of the returned object.

    Convenience method that returns the list of subscribed folders under this Folder

    api2test: public Folder[] listSubscribed() throws MessagingException

    how2test: Call this API on a folder object. Check for the list folder objects

    returned. This method just calls the list(pattern) method with "%" as the

    match pattern. This method can be invoked on a closed/open Folder.

    Returns a list of subscribed Folders belonging to this Folder's namespace that match the specified pattern.

    api2test: public Folder[] listSubscribed(String) throws MessagingException

    how2test: Same as above, except that now we pass various string arguments to this API.

    NOTE: Make sure that you have the following directory structure on the server before you run this testcase.

    default-dir/

    test[?]/

    a) The pattern can contain wildcards (in patttern) for list().

    b) Invoking this method on the same pattern multiple times

    will return that many distinct Folder objects.

    c) This method can be invoked on a closed/open Folder.

    d) If the folder does not support subscription, this method

    should resolve to list() [(the default implementation provided here, does just this).

    • Constructor Detail

      • listSubscribed_Test

        public listSubscribed_Test()
    • Method Detail

      • main

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

        public com.sun.javatest.Status run​(java.lang.String[] argv,
                                           java.io.PrintWriter log,
                                           java.io.PrintWriter out)
        Description copied from class: MailTest
        Default run() method ; sets i/o streams.
        Specified by:
        run in interface com.sun.javatest.Test
        Overrides:
        run in class MailTest
        Parameters:
        argv - command line arguments
        log - the log stream
        out - the output stream
        Returns:
        null