/** Test to Create Folder with special characters: / \ < > : " | ? * */ public void testCreateFolderSpecialCharacters() { boolean createFullPath = true; String remotePath = "/testSpecialCharacters_\\" + mCurrentDate; RemoteOperationResult result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_<" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_>" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_:" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_\"" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_|" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_?" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); remotePath = "/testSpecialCharacters_*" + mCurrentDate; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); }
/** Test Create Folder */ public void testCreateFolder() { String remotePath = "/testCreateFolder" + mCurrentDate; boolean createFullPath = true; RemoteOperationResult result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.isSuccess() || result.getCode() == ResultCode.TIMEOUT); // Create Subfolder remotePath = "/testCreateFolder" + mCurrentDate + "/" + "testCreateFolder" + mCurrentDate; createFullPath = true; result = mActivity.createFolder(remotePath, createFullPath); assertTrue(result.isSuccess() || result.getCode() == ResultCode.TIMEOUT); }