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  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 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 testNoodleUpdate()
          Test a noodle update.
 void testPartialFlatten()
          Test partial flatten.
 void testRead()
          Another test of reading.
 void testReadWrite()
          Test reading and writing.
 void testRename6()
           
 void testResetLayer()
          Test AVMSyncService resetLayer.
 void testSimple()
          Do a simple hello world test.
 void testSimpleUpdateBR()
          Test update to branch
 void testSimpleUpdateLD1()
           
 void testSimpleUpdateLD2()
           
 void testSimpleUpdateLD3()
           
 void testSimpleUpdateLD4()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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)


fContext

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


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

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

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

testRename6

public void testRename6()
                 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

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 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 - 2008 Alfresco Software, Inc. All Rights Reserved.