Package org.alfresco.ftp.dsl
Class FTPAssertion
- java.lang.Object
-
- org.alfresco.utility.dsl.DSLAssertion<FTPWrapper>
-
- org.alfresco.ftp.dsl.FTPAssertion
-
public class FTPAssertion extends org.alfresco.utility.dsl.DSLAssertion<FTPWrapper>
DSL with all assertion available forFTPWrapper
-
-
Constructor Summary
Constructors Constructor Description FTPAssertion(FTPWrapper ftpProtocol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FTPWrappercontentIs(java.lang.String expectedContent)FTPWrappercurrentFolderIs(java.lang.String folder)FTPWrapperdoesNotExistInFtp()FTPWrapperexistsInFtp()FTPWrapperhasChildren(org.alfresco.utility.model.ContentModel... contentModel)Verify the children(files and folders) from a parent folderFTPWrapperhasFiles(org.alfresco.utility.model.FileModel... fileModel)Verify if file children exist in parent folderFTPWrapperhasFolders(org.alfresco.utility.model.FolderModel... folderModel)Verify if folder children exist in parent folderFTPWrapperhasReplyCode(int replyCode)Verify the status for a specific FTP actionFTPWrapperhasSize(int sizeInMb)Verify the size of a fileFTPWrapperisDownloaded()Verify if file is downloaded in project root.FTPWrapperuserIsLoggedIn()FTPWrapperuserIsNotLoggedIn()
-
-
-
Constructor Detail
-
FTPAssertion
public FTPAssertion(FTPWrapper ftpProtocol)
-
-
Method Detail
-
userIsLoggedIn
public FTPWrapper userIsLoggedIn()
-
userIsNotLoggedIn
public FTPWrapper userIsNotLoggedIn()
-
currentFolderIs
public FTPWrapper currentFolderIs(java.lang.String folder) throws java.lang.Exception
- Throws:
java.lang.Exception
-
contentIs
public FTPWrapper contentIs(java.lang.String expectedContent) throws java.io.IOException
- Throws:
java.io.IOException
-
isDownloaded
public FTPWrapper isDownloaded()
Verify if file is downloaded in project root.- Returns:
-
existsInFtp
public FTPWrapper existsInFtp() throws java.lang.Exception
- Throws:
java.lang.Exception
-
doesNotExistInFtp
public FTPWrapper doesNotExistInFtp() throws java.lang.Exception
- Throws:
java.lang.Exception
-
hasFolders
public FTPWrapper hasFolders(org.alfresco.utility.model.FolderModel... folderModel) throws java.lang.Exception
Verify if folder children exist in parent folder- Parameters:
fileModel- children files- Returns:
- Throws:
java.lang.Exception
-
hasFiles
public FTPWrapper hasFiles(org.alfresco.utility.model.FileModel... fileModel) throws java.lang.Exception
Verify if file children exist in parent folder- Parameters:
fileModel- children files- Returns:
- Throws:
java.lang.Exception
-
hasChildren
public FTPWrapper hasChildren(org.alfresco.utility.model.ContentModel... contentModel) throws java.lang.Exception
Verify the children(files and folders) from a parent folder- Parameters:
contentModel- children- Returns:
- Throws:
java.lang.Exception
-
hasSize
public FTPWrapper hasSize(int sizeInMb) throws java.lang.Exception
Verify the size of a file- Parameters:
sizeInMb- size in MB- Returns:
- Throws:
java.lang.Exception
-
hasReplyCode
public FTPWrapper hasReplyCode(int replyCode)
Verify the status for a specific FTP action- Parameters:
replyCode- code to verify- Returns:
-
-