| |
|
| org.compass.sample.petclinic.AbstractClinicTests
All known Subclasses: org.compass.sample.petclinic.jdbc.JdbcClinicTests, org.compass.sample.petclinic.hibernate.HibernateClinicTests, org.compass.sample.petclinic.ojb.PersistenceBrokerClinicTests,
AbstractClinicTests | abstract public class AbstractClinicTests extends TestCase (Code) | | Base class for Clinic tests. Allows subclasses to specify context locations.
This class extends AbstractTransactionalDataSourceSpringContextTests, one of
the valuable test superclasses provided in the org.springframework.test
package. This represents best practice for integration tests with Spring. The
AbstractTransactionalDataSourceSpringContextTests superclass provides the
following services:
Injects test dependencies, meaning that we don't need to perform
application context lookups. See the setClinic() method. Injection uses
autowiring by type.
Executes each test method in its own transaction, which is automatically
rolled back by default. This means that even if tests insert or otherwise
change database state, there is no need for a teardown or cleanup script.
Provides useful inherited protected fields, such as a JdbcTemplate that
can be used to verify database state after test operations, or verify the
results of queries performed by application code. An ApplicationContext is
also inherited, and can be used for explicit lookup if necessary.
The AbstractTransactionalDataSourceSpringContextTests and related classes are
shipped in the spring-mock.jar.
author: Ken Krebs author: Rod Johnson See Also: org.springframework.test.AbstractTransactionalDataSourceSpringContextTests |
doPerformMirroringIfNeeded | protected void doPerformMirroringIfNeeded()(Code) | | If the gps device is active mirror type, perform the mirroring
|
getConfigLocations | abstract protected String[] getConfigLocations()(Code) | | |
hasClassMappings | abstract protected boolean hasClassMappings()(Code) | | |
setClinic | public void setClinic(Clinic clinic)(Code) | | This method is provided to set the Clinic instance being tested by the
Dependency Injection injection behaviour of the superclass from the
org.springframework.test package.
Parameters: clinic - clinic to test |
setTransactionManager | public void setTransactionManager(PlatformTransactionManager transactionManager)(Code) | | |
testCompassReindex | public void testCompassReindex()(Code) | | |
testFindOwners | public void testFindOwners()(Code) | | |
testGetPetTypes | public void testGetPetTypes()(Code) | | |
testGetVets | public void testGetVets()(Code) | | |
testInsertOwner | public void testInsertOwner()(Code) | | |
testInsertOwnerCompassMirror | public void testInsertOwnerCompassMirror()(Code) | | |
testInsertPet | public void testInsertPet()(Code) | | |
testInsertPetCompassMirror | public void testInsertPetCompassMirror()(Code) | | |
testInsertVisit | public void testInsertVisit()(Code) | | |
testLoadOwner | public void testLoadOwner()(Code) | | |
testLoadPet | public void testLoadPet()(Code) | | |
testUpdateOwnerCompassMirror | public void testUpdateOwnerCompassMirror() throws Exception(Code) | | |
testUpdatePetCompassMirror | public void testUpdatePetCompassMirror() throws Exception(Code) | | |
|
|
|