org.alfresco.repo.version
Class VersionServiceImplTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.test.AbstractTransactionalSpringContextTests
                              extended by org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
                                  extended by org.alfresco.util.BaseSpringTest
                                      extended by org.alfresco.repo.version.BaseVersionStoreTest
                                          extended by org.alfresco.repo.version.VersionServiceImplTest
All Implemented Interfaces:
junit.framework.Test

public class VersionServiceImplTest
extends BaseVersionStoreTest

versionService test class.


Field Summary
 
Fields inherited from class org.alfresco.repo.version.BaseVersionStoreTest
authenticationDAO, authenticationService, contentService, dbNodeService, dictionaryDAO, mlText, MLTEXT_PROP, MULTI_PROP, MULTI_VALUE_1, MULTI_VALUE_2, multiValue, nodeArchiveService, nodeProperties, nodeService, permissionService, PROP_1, PROP_2, PROP_3, rootNodeRef, TEST_ASPECT_QNAME, TEST_ASSOC, TEST_CHILD_ASSOC_1, TEST_CHILD_ASSOC_2, TEST_CONTENT, TEST_NAMESPACE, TEST_TYPE_QNAME, testStoreRef, transactionService, txnHelper, VALUE_1, VALUE_2, VALUE_3, VERSION_PROP_1, VERSION_PROP_2, VERSION_PROP_3, versionableNodes, versionProperties, versionService
 
Fields inherited from class org.alfresco.util.BaseSpringTest
sessionFactory
 
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
jdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionDefinition, transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Constructor Summary
VersionServiceImplTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void onSetUpInTransaction()
          Called during the transaction setup
protected  void onTearDownAfterTransaction()
           
 void testAddRemoveVersionableAspect()
           
 void testALF_3962()
           
 void testALF5618()
           
 void testAR807()
           
 void testAutoRemovalOfVersionHistory()
           
 void testAutoVersionOff()
           
 void testAutoVersionOnInitialVersionOn()
           
 void testAutoVersionOnUpdatePropsOnly()
           
 void testAutoVersionOnUpdatePropsOnlyWithExcludes()
           
 void testCreateInitialVersionWhenNotVersionable()
          Test versioning a non versionable node ie: no version apsect
 void testCreateIntialVersion()
          Tests the creation of the initial version of a versionable node
 void testCreateManyVersionsSameWorkspace()
          Test creating a version history with many versions from the same workspace
 void testCreateManyVersionsWithNullVersionProperties()
          Tests the creation of multiple versions of a versionable node with null version properties
 void testDeleteVersion()
          Test deleteVersion
 void testDeleteVersionHistory()
          Test deleteVersionHistory
 void testEnsureVersioningEnabled()
           
 void testGetVersionHistorySameWorkspace()
          Tests getVersionHistory when all the entries in the version history are from the same workspace.
 void testHasPermission()
          Check read permission for the frozen node
 void testInitialVersionOff()
           
 void testNoVersionHistory()
          Tests the version history
 void testRestore()
          Test restore
 void testRevert()
          Test revert
 void testSetup()
           
 void testVersioningAndAuditable()
          Ensure that versioning actions don't alter the auditable aspect properties on the original nodes
 void testVersioningChildren()
          Test versioning the children of a verionable node
 void testVersioningManyNodes()
          Test versioning many nodes in one go
 
Methods inherited from class org.alfresco.repo.version.BaseVersionStoreTest
checkNewVersion, checkVersion, createNewNode, createNewVersionableNode, createNode, createVersion, createVersion, createVersion, peekNextVersionLabel, setDictionaryDAO, setVersionService
 
Methods inherited from class org.alfresco.util.BaseSpringTest
flushAndClear, getConfigLocations, getSession, loadContext, setSessionFactory
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpBeforeTransaction, onTearDown, onTearDownInTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, 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

VersionServiceImplTest

public VersionServiceImplTest()
Method Detail

onSetUpInTransaction

protected void onSetUpInTransaction()
                             throws java.lang.Exception
Description copied from class: BaseVersionStoreTest
Called during the transaction setup

Overrides:
onSetUpInTransaction in class BaseVersionStoreTest
Throws:
java.lang.Exception

onTearDownAfterTransaction

protected void onTearDownAfterTransaction()
                                   throws java.lang.Exception
Overrides:
onTearDownAfterTransaction in class org.springframework.test.AbstractTransactionalSpringContextTests
Throws:
java.lang.Exception

testSetup

public void testSetup()

testCreateIntialVersion

public void testCreateIntialVersion()
Tests the creation of the initial version of a versionable node


testCreateManyVersionsSameWorkspace

public void testCreateManyVersionsSameWorkspace()
Test creating a version history with many versions from the same workspace


testCreateManyVersionsWithNullVersionProperties

public void testCreateManyVersionsWithNullVersionProperties()
Tests the creation of multiple versions of a versionable node with null version properties


testCreateInitialVersionWhenNotVersionable

public void testCreateInitialVersionWhenNotVersionable()
Test versioning a non versionable node ie: no version apsect


testVersioningChildren

public void testVersioningChildren()
Test versioning the children of a verionable node


testVersioningManyNodes

public void testVersioningManyNodes()
Test versioning many nodes in one go


testNoVersionHistory

public void testNoVersionHistory()
Tests the version history


testGetVersionHistorySameWorkspace

public void testGetVersionHistorySameWorkspace()
Tests getVersionHistory when all the entries in the version history are from the same workspace.


testRevert

public void testRevert()
Test revert


testRestore

public void testRestore()
Test restore


testDeleteVersionHistory

public void testDeleteVersionHistory()
Test deleteVersionHistory


testDeleteVersion

public void testDeleteVersion()
Test deleteVersion


testAutoVersionOnInitialVersionOn

public void testAutoVersionOnInitialVersionOn()

testAutoVersionOff

public void testAutoVersionOff()

testInitialVersionOff

public void testInitialVersionOff()

testAddRemoveVersionableAspect

public void testAddRemoveVersionableAspect()

testAutoRemovalOfVersionHistory

public void testAutoRemovalOfVersionHistory()

testAutoVersionOnUpdatePropsOnly

public void testAutoVersionOnUpdatePropsOnly()

testAutoVersionOnUpdatePropsOnlyWithExcludes

public void testAutoVersionOnUpdatePropsOnlyWithExcludes()

testALF5618

public void testALF5618()

testAR807

public void testAR807()

testHasPermission

public void testHasPermission()
Check read permission for the frozen node


testALF_3962

public void testALF_3962()

testVersioningAndAuditable

public void testVersioningAndAuditable()
                                throws java.lang.Exception
Ensure that versioning actions don't alter the auditable aspect properties on the original nodes

Throws:
java.lang.Exception

testEnsureVersioningEnabled

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

main

public static void main(java.lang.String[] args)


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