01: /**********************************************************************************
02: * $URL: $
03: * $Id: $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the"License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.tool.assessment.test.integration.context.spring;
21:
22: import junit.framework.*;
23: import org.sakaiproject.tool.assessment.integration.context.spring.*;
24: import org.sakaiproject.tool.assessment.integration.context.*;
25: import org.springframework.test.AbstractTransactionalSpringContextTests;
26:
27: public class TestFactoryUtil extends
28: AbstractTransactionalSpringContextTests {
29: private FactoryUtil factoryUtil = null;
30:
31: public TestFactoryUtil(String name) {
32: }
33:
34: protected void onSetUpInTransaction() throws Exception {
35: }
36:
37: protected String[] getConfigLocations() {
38:
39: String[] configLocations = { "org/sakaiproject/spring/applicationContext.xml" };
40:
41: return configLocations;
42: }
43:
44: public void testLookup() throws Exception {
45: IntegrationContextFactory actualReturn = factoryUtil.lookup();
46: assertNotNull(actualReturn);
47: }
48:
49: public static void main(String[] args) {
50: System.out.println("starting.");
51: TestFactoryUtil test = new TestFactoryUtil("test");
52: try {
53: test.setUp();
54: test.testLookup();
55: test.tearDown();
56: } catch (Exception ex) {
57: System.out.println("ex=" + ex);
58: }
59: System.out.println("done.");
60: }
61:
62: }
|