com.atlassian.crowd.acceptance.tests.persistence.migration
Class SchemaHelperIntegrationTest

java.lang.Object
  extended by com.atlassian.crowd.acceptance.tests.persistence.migration.SchemaHelperIntegrationTest

@ContextConfiguration(locations={"classpath:/applicationContext-schemahelper-config.xml","classpath:/applicationContext-CrowdDAO.xml"})
@TestExecutionListeners(value={org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class,org.springframework.test.context.transaction.TransactionalTestExecutionListener.class})
@TransactionConfiguration(defaultRollback=true)
public class SchemaHelperIntegrationTest
extends Object

This test is HSQLDB-specific because it uses a SQL script with the HSQLDB dialect to restore the database to a known state.


Constructor Summary
SchemaHelperIntegrationTest()
           
 
Method Summary
 void restoreDatabaseAndUpgradeSchema()
          The database needs to be restored and upgraded before a transaction is started, because otherwise Hibernate's SessionFactory will initialise it with the new schema.
 void testDaosAreFunctionalAfterUpgrade()
          DAOs must be run within a transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaHelperIntegrationTest

public SchemaHelperIntegrationTest()
Method Detail

restoreDatabaseAndUpgradeSchema

@BeforeTransaction
public void restoreDatabaseAndUpgradeSchema()
                                     throws Exception
The database needs to be restored and upgraded before a transaction is started, because otherwise Hibernate's SessionFactory will initialise it with the new schema.

Throws:
Exception

testDaosAreFunctionalAfterUpgrade

@Transactional
public void testDaosAreFunctionalAfterUpgrade()
                                       throws Exception
DAOs must be run within a transaction.

Throws:
Exception


Copyright © 2013 Atlassian. All Rights Reserved.