1 /*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5 package org.kuali.mobility.events.service;
6
7 import java.util.Date;
8 import java.util.List;
9 import org.junit.BeforeClass;
10 import org.junit.Test;
11 import static org.junit.Assert.*;
12 import org.springframework.context.ApplicationContext;
13 import org.springframework.context.support.ClassPathXmlApplicationContext;
14
15 /**
16 *
17 * @author swansje
18 */
19 public class EventsServiceImplTest {
20
21 private static ApplicationContext applicationContext;
22
23 @BeforeClass
24 public static void createApplicationContext() throws Exception
25 {
26 applicationContext = new ClassPathXmlApplicationContext( getConfigLocations() );
27 }
28
29 private static String[] getConfigLocations() {
30 return new String[] { "/SpringBeans.xml","/webmvc-config.xml" };
31 }
32
33 /**
34 * Test of getEvent method, of class EventsServiceImpl.
35 */
36 // @Test
37 // public void testGetEvent() {
38 // System.out.println("getEvent");
39 // String campus = "";
40 // String categoryId = "";
41 // String eventId = "";
42 // EventsServiceImpl instance = new EventsServiceImpl();
43 // Event expResult = null;
44 // Event result = instance.getEvent(campus, categoryId, eventId);
45 // assertEquals(expResult, result);
46 // }
47 //
48 // /**
49 // * Test of getAllEvents method, of class EventsServiceImpl.
50 // */
51 // @Test
52 // public void testGetAllEvents() {
53 // System.out.println("getAllEvents");
54 // String campus = "";
55 // String categoryId = "";
56 // EventsServiceImpl instance = new EventsServiceImpl();
57 // List expResult = null;
58 // List result = instance.getAllEvents(campus, categoryId);
59 // assertEquals(expResult, result);
60 // }
61 //
62 // /**
63 // * Test of getCategoriesByCampus method, of class EventsServiceImpl.
64 // */
65 // @Test
66 // public void testGetCategoriesByCampus() {
67 //
68 // String campus = null;
69 // EventsServiceImpl instance = (EventsServiceImpl)getApplicationContext().getBean("eventService");
70 // List result = instance.getCategoriesByCampus(campus);
71 // assertTrue( "Failed to load categories.", result != null && result.size() > 0 );
72 // }
73
74 /**
75 * @return the applicationContext
76 */
77 public static ApplicationContext getApplicationContext() {
78 return applicationContext;
79 }
80
81 /**
82 * @param applicationContext the applicationContext to set
83 */
84 public static void setApplicationContext(ApplicationContext applicationContext) {
85 EventsServiceImplTest.applicationContext = applicationContext;
86 }
87
88 }