org.nees.data.test
Class NFMSGeneralTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.nees.data.test.NFMSTestMetaClass
              extended byorg.nees.data.test.NFMSSessionTest
                  extended byorg.nees.data.test.NFMSGeneralTest
All Implemented Interfaces:
junit.framework.Test

public class NFMSGeneralTest
extends NFMSSessionTest

Author:
USER

Field Summary
 
Fields inherited from class org.nees.data.test.NFMSTestMetaClass
APPEND_FILE_COUNT_KEY, BACKEND_TESTS_ENABLED_KEY, DOWNLOADOPTIONS_COUNT, FAILED, FILE_SIZE_KEY, FTP_PASSWORD_KEY, FTP_TESTS_ENABLED_KEY, FTP_USERNAME_KEY, GENERAL_TESTS_ENABLED_KEY, GRID_FTP_TESTS_ENABLED_KEY, GRID_USER_CREDENTIAL_FILE_KEY, LOCAL_DEBUG_MODE_KEY, LOCAL_DEBUG_SESSION_USER_KEY, LOCAL_DEBUG_USER_HOME_KEY, LOCAL_FILE_TESTS_ENABLED_KEY, NFMS_FACADE_TESTS_ENABLED_KEY, NFMS_PROPERTIES_FILE_KEY, NFMS_SERVICE_URI_KEY, OK, SCRATCH_DIRECTORY_KEY, TEST_LOGICAL_NAME_KEY, TEST_NAMESPACE_KEY, TEST_PROPERTIES_FILE_KEY, UPLOADOPTIONS_COUNT_KEY, VERSION_FILE_COUNT_KEY
 
Constructor Summary
NFMSGeneralTest()
          Creates a new instance of NFMSGeneralTest
NFMSGeneralTest(java.lang.String x)
           
 
Method Summary
static junit.framework.Test suite()
           
 void testArbitraryPathLogicalName()
           
 void testBadDownloadAbort()
           
 void testBadDownloadComplete()
          Bad upload complete call.
 void testBadProtocol()
          This will attempt to upload a file using an illegal protocol (we have illegal characters in this protocol, so we know it is never valid).
 void testBadUploadAbort()
           
 void testBadUploadComplete()
          Bad upload complete call.
 void testDeleteFile()
          This test will place a new file on the server and delete it.
 void testGetBadFileVersion()
          Now we check that putting a file and querying NFMS will give us the right version.
 void testGetDeletedFileVersion()
          This test puts a file, deletes it then asks if the version is available.
 void testGetFileVersion()
          Now we check that putting a file and querying NFMS will give us the right version.
 void testLongLogicalName()
           
 void testNonRelativePathLogicalName()
          This tests that NFMS can resolve a logical name local to the repository.
 void testNoUploadMade()
          Bad upload complete: Here a request is made but no file is uploaded before the upload complete command is issued.
 void testServerSideAppend_NoVersion()
           
 void testServerSideAppend_WithVersion()
          THis test will upload two files then append one to the other, versioning the original.
 void testServerSideCopy()
           
 void testServerSideCopyNewVersion()
          Checks that overwriting an existing file on a server-side copy fails when requested to do so.
 void testServerSideCopyNoOverwrite_NoAppend()
          Now we test that having a file on the server and specifying no overwrite and no append fails.
 void testServerSideCopyNoOverwrite()
          Checks that overwriting an existing file on a server-side copy fails when requested to do so.
 void testServerSideCopyOverwrite()
          The next test will check that putting up a couple of files and copying one to the other replaces the second by the first with no versioning.
 void testUploadAbort()
           
 
Methods inherited from class org.nees.data.test.NFMSSessionTest
downloadLocalFile, getNFMS, localFileTransfer, startLocalFileDownload, startLocalFileUpload, uploadLocalFile, uploadLocalFile
 
Methods inherited from class org.nees.data.test.NFMSTestMetaClass
getAssumedAuthenticIdentity, getBackend, getBootstrapper, getFTU, getGridID, getLocalNFMS, getNFMSProperties, getRepoRootDirURI, getScratchDir, getTestProperties, getUserDirURI, makeLogicalName, report, report
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFMSGeneralTest

public NFMSGeneralTest()
Creates a new instance of NFMSGeneralTest


NFMSGeneralTest

public NFMSGeneralTest(java.lang.String x)
Method Detail

suite

public static junit.framework.Test suite()

testServerSideCopy

public void testServerSideCopy()

testServerSideCopyNoOverwrite

public void testServerSideCopyNoOverwrite()
Checks that overwriting an existing file on a server-side copy fails when requested to do so.


testServerSideCopyNewVersion

public void testServerSideCopyNewVersion()
Checks that overwriting an existing file on a server-side copy fails when requested to do so.


testServerSideCopyOverwrite

public void testServerSideCopyOverwrite()
The next test will check that putting up a couple of files and copying one to the other replaces the second by the first with no versioning.


testServerSideCopyNoOverwrite_NoAppend

public void testServerSideCopyNoOverwrite_NoAppend()
Now we test that having a file on the server and specifying no overwrite and no append fails.


testServerSideAppend_NoVersion

public void testServerSideAppend_NoVersion()

testServerSideAppend_WithVersion

public void testServerSideAppend_WithVersion()
THis test will upload two files then append one to the other, versioning the original. It will then download them and be sure that the versions have been correctly made.


testDeleteFile

public void testDeleteFile()
This test will place a new file on the server and delete it. It will then check if it can download the deleted file.


testGetDeletedFileVersion

public void testGetDeletedFileVersion()
This test puts a file, deletes it then asks if the version is available.


testGetFileVersion

public void testGetFileVersion()
Now we check that putting a file and querying NFMS will give us the right version.


testGetBadFileVersion

public void testGetBadFileVersion()
Now we check that putting a file and querying NFMS will give us the right version.


testBadProtocol

public void testBadProtocol()
This will attempt to upload a file using an illegal protocol (we have illegal characters in this protocol, so we know it is never valid).

Expected behavior - NFMS will throw a server-side exception.


testBadUploadComplete

public void testBadUploadComplete()
Bad upload complete call.


testBadDownloadComplete

public void testBadDownloadComplete()
Bad upload complete call.


testUploadAbort

public void testUploadAbort()

testBadUploadAbort

public void testBadUploadAbort()

testBadDownloadAbort

public void testBadDownloadAbort()

testNoUploadMade

public void testNoUploadMade()
Bad upload complete: Here a request is made but no file is uploaded before the upload complete command is issued.

Expected behavior - NFMS should throw an exception.


testArbitraryPathLogicalName

public void testArbitraryPathLogicalName()

testLongLogicalName

public void testLongLogicalName()

testNonRelativePathLogicalName

public void testNonRelativePathLogicalName()
This tests that NFMS can resolve a logical name local to the repository. Makes sense to use it with a file-based permanent store, but it can't hurt generally...