{color:green}Help is available by sending an email to [mailto:csf-support@mit.edu]{color} {color:green}Have any suggestion on how improve this wiki? Please give us your feedback at [mailto:csf-support@mit.edu]{color} |
Quick Links to: |
New CSF AbstractIntegrationTestBase.java unit test base classThis new CSF abstract class is to be used with all unit tests. It replaces the following deprecated classes
that were used in csf-common-legacy. |
About the AbstractIntegrationTestBase base classBelow is a complete listing of the AbstractIntergrationTestBase class. Of particular interest is the usage of the @Transactional and the @ContextConfiguration annotations.
The locations element of the @ContextConfiguration only specifies one xml file. This xml file is used to set the default application context for ALL unit tests which extends AbstractIntegrationTestBase.java class. At the bottom of this page is more information on how to configure and how to override the default application context.
|
Usage of the AbstractIntegrationTestBase base class
|
How to configuration the default test application contextThe annotation
is used to set the default application context for all the junit tests which extend the AbstractIntegrationTestBase .java class. 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-csf-unit-tests-default.xml must be created in the projects src/test/resources directory. To download the applicationContext-csf-unit-tests-default.xml file, right click on this link and select Save target as.... Be sure to save the file in the project's src/test/resources directory. The following is a listing of the applicationContext-csf-unit-tests-default.xml file:
|
How to override for the default test application context |