Package com.cloudloop.storage.adapter

Examples of com.cloudloop.storage.adapter.CloudStoreAdapterBase.createDirectory()


   
    @Test
    public void testSendContainsRequest( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  store.createDirectory( store.getDirectory( "foo/bar/../" ) );
  CloudStoreDirectory dir = store.getDirectory( "foo/bar/../" );
  assertTrue( store.contains( dir ) );
    }
   
    @Test
View Full Code Here


    @Test
    public void testSendIntraStoreCopyRequest( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStorePath dirPath = new CloudStorePath( "/foo/bar/" );
  store.createDirectory( store.getDirectory( "/foo/bar/" ) );
  CloudStoreFile fileToUpload = store.getFile( "/foo/bar/some_file.txt" );
  fileToUpload.setStreamToStore( new MockFileStream( 50 ) );
  fileToUpload.write( null );
  // HACK!! (AL) For some reason, Nirvanix needs time to process the file
  // before it can be copied. I'm not sure why this is, and I can't
View Full Code Here

   
    @Test
    public void testSendUploadDownloadRequest( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  store.createDirectory( store.getDirectory( "/foo/bar/" ) );
  CloudStoreFile fileToUpload = store.getFile( "/foo/bar/some_file.txt" );
  fileToUpload.setStreamToStore( new MockFileStream( 50 ) );
  fileToUpload.write( null );
  FileStreamComparer.areStreamsEqual( new MockFileStream( 50 ),
              fileToUpload.read( null ) );
View Full Code Here

   
    @Test
    public void testSendRemoveFileRequest( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  store.createDirectory( store.getDirectory( "/foo/bar/" ) );
  CloudStoreFile fileToUpload = store.getFile( "/foo/bar/some_file.txt" );
  fileToUpload.setStreamToStore( new MockFileStream( 50 ) );
  fileToUpload.write( null );
  fileToUpload.remove( );
  assertFalse( store.contains( fileToUpload ) );
View Full Code Here

   
    private void setupDirectoryForListTest( int numSubDirs, int numFiles,
              int numSubSubObjects, String baseDir )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  store.createDirectory( store.getDirectory( baseDir ) );
 
  for ( int i = 0; i < numSubDirs; i++ )
  {
      String dirPath = baseDir + "dir_" + i + "/";
      CloudStoreDirectory dir = store.getDirectory( dirPath );
View Full Code Here

 
  for ( int i = 0; i < numSubDirs; i++ )
  {
      String dirPath = baseDir + "dir_" + i + "/";
      CloudStoreDirectory dir = store.getDirectory( dirPath );
      store.createDirectory( dir );
     
      // create files and directories under each subdir
      // in order to test recursive functionality
      for ( int j = 0; j < numSubSubObjects; j++ )
      {
View Full Code Here

      // in order to test recursive functionality
      for ( int j = 0; j < numSubSubObjects; j++ )
      {
    CloudStoreDirectory subDir = store.getDirectory( dirPath
      + "sub_dir_" + j + "/" );
    store.createDirectory( subDir );
   
    CloudStoreFile subFile = store.getFile( dirPath + "sub_file_"
      + j );
    subFile.setStreamToStore( new MockFileStream( 50 ) );
    subFile.write( null );
View Full Code Here

   
    @Test
    public void testSendWriteMetadataRequest( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  store.createDirectory( store.getDirectory( "/foo/bar/" ) );
  CloudStoreFile fileToUpload = store.getFile( "/foo/bar/some_file.txt" );
  fileToUpload.setStreamToStore( new MockFileStream( 50 ) );
  fileToUpload.setCustomMetaTag( "foo", "bar" );
  fileToUpload.write( null );
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.