1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.calendar.service;
17
18 import java.util.List;
19
20 import org.junit.After;
21 import org.junit.Assert;
22 import org.junit.Before;
23 import org.junit.Test;
24 import org.kuali.hr.test.KPMETestCase;
25 import org.kuali.hr.time.calendar.CalendarEntries;
26 import org.kuali.hr.time.service.base.TkServiceLocator;
27
28 public class CalendarEntriesServiceImplTest extends KPMETestCase {
29 private CalendarEntriesService ceService;
30 @Before
31 public void setUp() throws Exception{
32 super.setUp();
33 ceService = TkServiceLocator.getCalendarEntriesService();
34 }
35
36 @After
37 public void tearDown() throws Exception {
38 super.tearDown();
39 }
40
41 @Test
42 public void testGetAllCalendarEntriesForCalendarId() {
43 List<CalendarEntries> ceList= ceService.getAllCalendarEntriesForCalendarId("2");
44 Assert.assertNotNull("Calendar entries not found for Calendar Id '2'" , ceList);
45 Assert.assertTrue("Calendar entries not found for Calendar Id '2'", ceList.size() != 0);
46 }
47 @Test
48 public void testGetAllCalendarEntriesForCalendarIdAndYear() {
49 List<CalendarEntries> ceList= ceService.getAllCalendarEntriesForCalendarIdAndYear("2", "2012");
50 Assert.assertNotNull("Calendar entries not found for Calendar Id '2' and year '2012'", ceList);
51 Assert.assertTrue("Calendar entries not found for Calendar Id 2", ceList.size() != 0);
52 }
53 }