org.alfresco.repo.avm
Class AVMServiceLocalTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.avm.AVMServiceLocalTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AVMServiceRemoteSystemTest

public class AVMServiceLocalTest
extends junit.framework.TestCase

Local unit tests of AVM (AVMSyncService & AVMService)


Field Summary
protected static org.alfresco.util.NameMatcher excluder
           
protected static org.springframework.context.ApplicationContext fContext
          The application context.
protected static AVMRemote fService
          The AVMRemote - can be local (AVMRemoteLocal) or remote (AVMRemote)
protected static AVMSyncService fSyncService
          The AVMSyncService - can be local (AVMSyncService) or remote (AVMSyncServiceRemote)
 
Constructor Summary
AVMServiceLocalTest()
           
 
Method Summary
protected  void explorePaths(java.lang.String path)
           
protected  void recursiveContents(java.lang.String path)
           
protected  java.lang.String recursiveContents(java.lang.String path, int version, boolean followLinks)
          Get the recursive contents of the given path and version.
protected  void recursiveList(java.lang.String store)
           
protected  void recursiveList(java.lang.String store, int version)
           
protected  java.lang.String recursiveList(java.lang.String repoName, int version, boolean followLinks)
          Helper to write a recursive listing of an AVMStore at a given version.
protected  java.lang.String recursiveList(java.lang.String path, int version, int indent, boolean followLinks)
          Recursive list the given path.
protected  void setUp()
           
protected  void setupBasicTree()
          Setup a basic tree.
protected  void tearDown()
           
 void testBulkUpdateLD()
          Test bulk update (using layered directory).
 void testDeleteLD1()
           
 void testDeleteLD2()
           
 void testDeleteLD3()
           
 void testDeleteLD4()
           
 void testDeleteLD5()
           
 void testDeleteLD6()
           
 void testErrorState()
          Test a call that should return null;
 void testFlatten()
          Test the flatten operation, with a little bit of compare and update.
 void testGetAPath()
           
 void testLayeredFileDeleteFile1()
           
 void testLayeredFileDeleteFile2()
           
 void testLayeredFileDeleteFile3()
           
 void testLayeredFileDeleteFile4()
           
 void testLayeredFolder1()
           
 void testLayeredFolder2()
           
 void testLayeredFolder3()
           
 void testLayeredFolder4()
           
 void testLayeredFolderDelete1()
           
 void testLayeredFolderDelete2()
           
 void testLayeredFolderDelete3()
           
 void testLayeredFolderDelete4()
           
 void testNoodleUpdate()
          Test a noodle update.
 void testPartialFlatten()
          Test partial flatten.
 void testRead()
          Another test of reading.
 void testReadWrite()
          Test reading and writing.
 void testRename1()
           
 void testRename2()
           
 void testRename3()
           
 void testResetLayer()
          Test AVMSyncService resetLayer.
 void testSetup()
           
 void testSimple()
          Do a simple hello world test.
 void testSimpleUpdateBR()
          Test update to branch
 void testSimpleUpdateLD1()
           
 void testSimpleUpdateLD2()
           
 void testSimpleUpdateLD3()
           
 void testSimpleUpdateLD4()
           
 void testSimpleUpdateLD5()
           
 void testSimpleUpdateLD6()
           
 void testSimpleUpdateLF1()
           
 void testSimpleUpdateLF2()
           
 void testSimpleUpdateLF3()
           
 void testUpdate()
          Test AVMSyncService update.
 void testUpdateDirectoryTitleAndDescription()
          Test directory properties update ...
 void testUpdateFileTitleAndDescription()
          Test file properties update ...
 void testUpdateSnapshot()
          Test that an update forces a snapshot on the source.
 
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
 

Field Detail

fContext

protected static org.springframework.context.ApplicationContext fContext
The application context.


fService

protected static AVMRemote fService
The AVMRemote - can be local (AVMRemoteLocal) or remote (AVMRemote)


fSyncService

protected static AVMSyncService fSyncService
The AVMSyncService - can be local (AVMSyncService) or remote (AVMSyncServiceRemote)


excluder

protected static org.alfresco.util.NameMatcher excluder
Constructor Detail

AVMServiceLocalTest

public AVMServiceLocalTest()
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

testSetup

public void testSetup()
               throws java.lang.Exception
Throws:
java.lang.Exception

testGetAPath

public void testGetAPath()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testSimple

public void testSimple()
                throws java.lang.Throwable
Do a simple hello world test.

Throws:
java.lang.Throwable

explorePaths

protected void explorePaths(java.lang.String path)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testReadWrite

public void testReadWrite()
                   throws java.lang.Throwable
Test reading and writing.

Throws:
java.lang.Throwable

testRead

public void testRead()
              throws java.lang.Throwable
Another test of reading.

Throws:
java.lang.Throwable

testErrorState

public void testErrorState()
                    throws java.lang.Throwable
Test a call that should return null;

Throws:
java.lang.Throwable

testSimpleUpdateBR

public void testSimpleUpdateBR()
                        throws java.lang.Throwable
Test update to branch

Throws:
java.lang.Throwable

testSimpleUpdateLD1

public void testSimpleUpdateLD1()
                         throws java.lang.Throwable
Throws:
java.lang.Throwable

testSimpleUpdateLD2

public void testSimpleUpdateLD2()
                         throws java.lang.Throwable
Throws:
java.lang.Throwable

testSimpleUpdateLD3

public void testSimpleUpdateLD3()
                         throws java.lang.Throwable
Throws:
java.lang.Throwable

testSimpleUpdateLD4

public void testSimpleUpdateLD4()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleUpdateLD5

public void testSimpleUpdateLD5()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleUpdateLD6

public void testSimpleUpdateLD6()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteLD1

public void testDeleteLD1()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteLD2

public void testDeleteLD2()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteLD3

public void testDeleteLD3()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteLD4

public void testDeleteLD4()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testBulkUpdateLD

public void testBulkUpdateLD()
                      throws java.lang.Exception
Test bulk update (using layered directory).

Throws:
java.lang.Exception

testFlatten

public void testFlatten()
                 throws java.lang.Exception
Test the flatten operation, with a little bit of compare and update.

Throws:
java.lang.Exception

testPartialFlatten

public void testPartialFlatten()
                        throws java.lang.Exception
Test partial flatten.

Throws:
java.lang.Exception

testResetLayer

public void testResetLayer()
                    throws java.lang.Exception
Test AVMSyncService resetLayer.

Throws:
java.lang.Exception

testUpdate

public void testUpdate()
                throws java.lang.Exception
Test AVMSyncService update.

Throws:
java.lang.Exception

testUpdateSnapshot

public void testUpdateSnapshot()
                        throws java.lang.Exception
Test that an update forces a snapshot on the source.

Throws:
java.lang.Exception

testNoodleUpdate

public void testNoodleUpdate()
                      throws java.lang.Exception
Test a noodle update.

Throws:
java.lang.Exception

testRename1

public void testRename1()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testRename2

public void testRename2()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testRename3

public void testRename3()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testUpdateFileTitleAndDescription

public void testUpdateFileTitleAndDescription()
                                       throws java.lang.Exception
Test file properties update ...

Throws:
java.lang.Exception

testUpdateDirectoryTitleAndDescription

public void testUpdateDirectoryTitleAndDescription()
                                            throws java.lang.Exception
Test directory properties update ...

Throws:
java.lang.Exception

testSimpleUpdateLF1

public void testSimpleUpdateLF1()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleUpdateLF2

public void testSimpleUpdateLF2()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleUpdateLF3

public void testSimpleUpdateLF3()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolder1

public void testLayeredFolder1()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolder2

public void testLayeredFolder2()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolder3

public void testLayeredFolder3()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolder4

public void testLayeredFolder4()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolderDelete1

public void testLayeredFolderDelete1()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolderDelete2

public void testLayeredFolderDelete2()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolderDelete3

public void testLayeredFolderDelete3()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFolderDelete4

public void testLayeredFolderDelete4()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFileDeleteFile1

public void testLayeredFileDeleteFile1()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFileDeleteFile2

public void testLayeredFileDeleteFile2()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFileDeleteFile3

public void testLayeredFileDeleteFile3()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testLayeredFileDeleteFile4

public void testLayeredFileDeleteFile4()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteLD5

public void testDeleteLD5()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteLD6

public void testDeleteLD6()
                   throws java.lang.Exception
Throws:
java.lang.Exception

recursiveContents

protected void recursiveContents(java.lang.String path)

recursiveContents

protected java.lang.String recursiveContents(java.lang.String path,
                                             int version,
                                             boolean followLinks)
Get the recursive contents of the given path and version.

Parameters:
path -
version -
Returns:
A string representation of the contents.

recursiveList

protected void recursiveList(java.lang.String store)

recursiveList

protected void recursiveList(java.lang.String store,
                             int version)

recursiveList

protected java.lang.String recursiveList(java.lang.String repoName,
                                         int version,
                                         boolean followLinks)
Helper to write a recursive listing of an AVMStore at a given version.

Parameters:
repoName - The name of the AVMStore.
version - The version to look under.

recursiveList

protected java.lang.String recursiveList(java.lang.String path,
                                         int version,
                                         int indent,
                                         boolean followLinks)
Recursive list the given path.

Parameters:
path - The path.
version - The version.
indent - The current indent level.

setupBasicTree

protected void setupBasicTree()
                       throws java.io.IOException
Setup a basic tree.

Throws:
java.io.IOException


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