org.alfresco.repo.version
Class VersionMigratorTest

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.VersionMigratorTest
All Implemented Interfaces:
junit.framework.Test

public class VersionMigratorTest
extends BaseVersionStoreTest

Test simple version store migration


Field Summary
protected  CheckOutCheckInService cociService
           
protected  org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
           
protected  IntegrityChecker integrityChecker
           
protected  PolicyComponent policyComponent
           
protected  VersionServiceImpl version1Service
           
protected  Version2ServiceImpl version2Service
           
protected  VersionMigrator versionMigrator
           
protected  org.alfresco.service.cmr.repository.NodeService versionNodeService
           
 
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
VersionMigratorTest()
           
 
Method Summary
protected  void onSetUpInTransaction()
          Called during the transaction setup
 void test_ETHREEOH_1540()
           
 void test_ETHREEOH_2091()
           
 void testMigrateMultipleNodesSuccessful()
           
 void testMigrateMultipleVersions()
          Test migration of a multiple versioned nodes
 void testMigrateOneVersion()
          Test migration of a simple versioned node (one version, no children)
 void testMigrateVersionWithAssocs()
          Test migration of a single versioned node with versioned child assocs & peer assocs
 
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, onTearDownAfterTransaction, 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
 

Field Detail

version1Service

protected VersionServiceImpl version1Service

version2Service

protected Version2ServiceImpl version2Service

versionNodeService

protected org.alfresco.service.cmr.repository.NodeService versionNodeService

versionMigrator

protected VersionMigrator versionMigrator

policyComponent

protected PolicyComponent policyComponent

dictionaryService

protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService

cociService

protected CheckOutCheckInService cociService

integrityChecker

protected IntegrityChecker integrityChecker
Constructor Detail

VersionMigratorTest

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

testMigrateOneVersion

public void testMigrateOneVersion()
                           throws java.lang.Exception
Test migration of a simple versioned node (one version, no children)

Throws:
java.lang.Exception

testMigrateMultipleVersions

public void testMigrateMultipleVersions()
                                 throws java.lang.Exception
Test migration of a multiple versioned nodes

Throws:
java.lang.Exception

testMigrateMultipleNodesSuccessful

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

test_ETHREEOH_2091

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

test_ETHREEOH_1540

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

testMigrateVersionWithAssocs

public void testMigrateVersionWithAssocs()
                                  throws java.lang.Exception
Test migration of a single versioned node with versioned child assocs & peer assocs

Throws:
java.lang.Exception
Since:
3.3 Ent - applies only to direct upgrade from 2.x to 3.3 Ent or higher


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