Class AttachmentsTester


  • public class AttachmentsTester
    extends Object
    • Constructor Detail

      • AttachmentsTester

        public AttachmentsTester​(net.sourceforge.jwebunit.junit.WebTester webTester)
    • Method Detail

      • generateLargeAttachment

        public static File generateLargeAttachment​(String filename,
                                                   long bytes)
      • generateAttachment

        public static File generateAttachment​(String filename,
                                              String text)
      • attachFile

        public void attachFile​(File attachment)
      • attachFile

        public void attachFile​(File attachment,
                               @Nullable String comment)
        Click the attach file link, attach a given file with a given comment and submit the attachment form.
        Parameters:
        attachment - the file attachment
        comment - the comment for the attachment
      • attachFileWithName

        public void attachFileWithName​(String fileName,
                                       InputStream in,
                                       String comment)
        Click the attach file link, attach a given file with a given comment and submit the attachment form.
        Parameters:
        fileName - the filename to attach
        in - the stream to read the file
        comment - a comment for this attachment
      • deleteFileWithName

        public void deleteFileWithName​(String fileName)
        Click the attach file link, trash a given file with a given name and submit the trash form.
        Parameters:
        fileName - the filename to trash