$Id: SakaiDependencyInjectionTests.java 59688 2009-04-03 23:45:02Z email@example.com $
Copyright (c) 2008 The Sakai Foundation
Licensed under the Educational Community License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
import static org.sakaiproject.test.ComponentContainerEmulator.setTestSakaiHome;
Allows for Spring dependency injection from Sakai while using an emulated component
container (i.e., without running Tomcat or another web server).
As with the Spring superclass, AbstractDependencyInjectionSpringContextTests,
you can set up your own Spring application context by returning a list
of resource locations from "getConfigLocations()", The difference is that
your application context will have Sakai's component-level context as its parent.
This models the bean visibility you get with a Sakai web application (although
the classloading still won't be completely realistic).
If you run more than one integration test and you need a clean start between
tests to avoid static debris in the component system, make sure to include
a call to "setDirty()" in a "tearDown()" or "oneTimeTearDown()" method.