View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    * 
7    * http://www.osedu.org/licenses/ECL-2.0
8    * 
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  package org.kuali.mobility.tours.service;
16  
17  import static org.junit.Assert.*;
18  
19  import org.apache.log4j.Logger;
20  import org.junit.AfterClass;
21  import org.junit.BeforeClass;
22  import org.junit.Test;
23  import org.springframework.context.ApplicationContext;
24  import org.springframework.context.support.FileSystemXmlApplicationContext;
25  
26  public class ToursServiceImplTest {
27  	private static final Logger LOG = Logger.getLogger(ToursServiceImplTest.class );
28  	
29  	private static ApplicationContext applicationContext;
30  
31  	public static ApplicationContext getApplicationContext() {
32  		return applicationContext;
33  	}
34  
35  	public static void setApplicationContext(ApplicationContext applicationContext) {
36  		ToursServiceImplTest.applicationContext = applicationContext;
37  	}
38  	
39  	@BeforeClass
40  	public static void setUpClass() throws Exception {
41  		ToursServiceImplTest.setApplicationContext(new FileSystemXmlApplicationContext(getConfigLocations()));
42  	}
43  	
44  	private static String[] getConfigLocations() {
45  		return new String[] {"classpath:/ToursSpringBeans.xml"};
46  	}
47  	
48  	@AfterClass
49  	public static void tearDownClass() throws Exception {
50  	}
51  	
52  	@Test
53  	public void testFindAllTours() {
54  		ToursServiceImpl service = (ToursServiceImpl) getApplicationContext().getBean("toursService");
55  		//assertTrue("found no tours", service.findAllTours().size() > 0);
56  	}
57  	
58  	@Test
59  	public void testCreateTourKml() {
60  		
61  	}
62  }