Class autoclose_Test

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

    public class autoclose_Test
    extends MailTest
    This class tests the AutoCloseable and close() APIs.

    // Close this folder

    api2test: public void close(boolean expunge)

    api2test: AutoCloseable

    how2test: Open a folder in a try-with-resources block, add messages to the folder, mark the messages DELETED, exit the block. If the folder is closed and the messages are deleted then the test passes, otherwise it fails.

    • Constructor Detail

      • autoclose_Test

        public autoclose_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