com.atlassian.confluence.it
Class AttachmentsTester

java.lang.Object
  extended by com.atlassian.confluence.it.AttachmentsTester

public class AttachmentsTester
extends Object


Constructor Summary
AttachmentsTester(AdminConsole adminConsole, net.sourceforge.jwebunit.junit.WebTester webTester)
           
 
Method Summary
 void attachFile(File attachment)
           
 void attachFile(File attachment, String comment)
          Click the attach file link, attach a given file with a given comment and submit the attachment form.
 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.
 void createMail(File mail, String spaceKey, String spaceTitle)
           
static File generateAttachment(String filename, String text)
           
static File generateLargeAttachment(String filename, long bytes)
           
 void importMail(String filePath, String spaceKey, String spaceTitle)
          Creates mails in the specified space.
 void importMailAndAssertNoRunningTask(String filePath, String spaceKey, String spaceTitle)
          Creates mails in the specified space and then checks if it successfully moved to the No Long Running Task page.
 void setAttachmentMaxUploadSize(long max)
           
 void setMaxAttachmentsInUI(long max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentsTester

public AttachmentsTester(AdminConsole adminConsole,
                         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

createMail

public void createMail(File mail,
                       String spaceKey,
                       String spaceTitle)

setAttachmentMaxUploadSize

public void setAttachmentMaxUploadSize(long max)

setMaxAttachmentsInUI

public void setMaxAttachmentsInUI(long max)

importMail

public void importMail(String filePath,
                       String spaceKey,
                       String spaceTitle)
Creates mails in the specified space. Mail import can be done with an Mbox file or single mail. No explicit assertions are made by this method.

Parameters:
filePath - the file path to the mailbox
spaceKey - the space key to import into
spaceTitle -

importMailAndAssertNoRunningTask

public void importMailAndAssertNoRunningTask(String filePath,
                                             String spaceKey,
                                             String spaceTitle)
Creates mails in the specified space and then checks if it successfully moved to the No Long Running Task page. Mail import can be done with an Mbox file or single mail.

Parameters:
filePath - the file path to the mailbox
spaceKey - the space key to import into
spaceTitle -


Copyright © 2003-2013 Atlassian. All Rights Reserved.