Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Usage of the AbstractIntegrationTestBase base class

  1. The following code fragment illustrates how to use AbstractIntegrationTestBase class
    Code Block
    import edu.mit.csf.test.AbstractIntegrationTestBase;
    
    public class TestHibernateAcademicTermDao extends AbstractIntegrationTestBase {
    
    }
    

  2. Add the following dependencies to your project's pom.xml.
    Code Block
            <dependency>
                <groupId>edu.mit.ist.es.csf</groupId>
                <artifactId>csf-test</artifactId>
                <version>[0.0.0,999.999.999)</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>edu.mit.ist.es.csf</groupId>
                <artifactId>csf-test</artifactId>
                <version>[0.0.0,999.999.999)</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.10</version>
            </dependency>
    
How to configuration the default test application context
Panel
Wiki Markup

{anchor:configure default context}
h3. How to configuration the default test application context
The annotation

@ContextConfiguration(locations = {"classpath:applicationContext-csf-unit-tests-default.xml"})

is used to set the default application context for all the junit tests which extend the AbstractIntegrationTestBase .java class.&nbsp;&nbsp;

If the project was created using the es-project-template (for either the jar or war) then applicationContext-csf-unit-tests-default.xml file can be found it the project's src/test/resources directory.

If the was not created using the es-project-template, then the applicationContext-cst-unit-tests-default.xml must be created in the projects sr/test/resources directory.

Anchor
configure default contextconfigure default context
Panel

Anchor
override default context
override default context

How to override for the default test application context