org.alfresco.filesys
Class FTPServerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.filesys.FTPServerTest
All Implemented Interfaces:
junit.framework.Test

public class FTPServerTest
extends junit.framework.TestCase

End to end JUNIT test of the FTP server Uses the commons-net ftp client library to connect to the Alfresco FTP server.


Constructor Summary
FTPServerTest()
           
 
Method Summary
 void DISABLED_testQuota()
          Create a user with a small quota.
protected  void setUp()
           
protected  void tearDown()
           
 void testCRUD()
          Test CRUD for FTP server
 void testCWD()
          Test CWD for FTP server
 void testFTPConnect()
          Simple test that connects to the inbuilt ftp server and logs on
 void testFTPConnectNegative()
          Simple negative test that connects to the inbuilt ftp server and attempts to log on with the wrong password.
 void testFtpQuotaAndFtp()
          Test a quota failue exception over FTP.
 void testPathNames()
          Test of obscure path names in the FTP server RFC959 states that paths are constructed thus...
 void testTwoUserUpdate()
          Create a user other than "admin" who has access to a set of files.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTPServerTest

public FTPServerTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testFTPConnect

public void testFTPConnect()
                    throws java.lang.Exception
Simple test that connects to the inbuilt ftp server and logs on

Throws:
java.lang.Exception

testFTPConnectNegative

public void testFTPConnectNegative()
                            throws java.lang.Exception
Simple negative test that connects to the inbuilt ftp server and attempts to log on with the wrong password.

Throws:
java.lang.Exception

testCWD

public void testCWD()
             throws java.lang.Exception
Test CWD for FTP server

Throws:
java.lang.Exception

testCRUD

public void testCRUD()
              throws java.lang.Exception
Test CRUD for FTP server

Throws:
java.lang.Exception

testPathNames

public void testPathNames()
                   throws java.lang.Exception
Test of obscure path names in the FTP server RFC959 states that paths are constructed thus... ::= | ::= ::= any of the 128 ASCII characters except and So we need to check how high characters and problematic are encoded

Throws:
java.lang.Exception

testTwoUserUpdate

public void testTwoUserUpdate()
                       throws java.lang.Exception
Create a user other than "admin" who has access to a set of files. Create a folder containing test.docx as user one Update that file as user two. Check user one can see user two's changes.

Throws:
java.lang.Exception

testFtpQuotaAndFtp

public void testFtpQuotaAndFtp()
                        throws java.lang.Exception
Test a quota failue exception over FTP. A file should not exist after a create and quota exception.

Throws:
java.lang.Exception

DISABLED_testQuota

public void DISABLED_testQuota()
                        throws java.lang.Exception
Create a user with a small quota. Upload a file less than the quota. Upload a file greater than the quota.

Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.