com.atlassian.crowd.acceptance.tests.persistence.migration
Class SchemaHelperIntegrationTest
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemaHelperIntegrationTest
public SchemaHelperIntegrationTest()
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.