1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.edo.checklist;
17
18 import static org.junit.Assert.assertEquals;
19
20 import java.util.List;
21
22 import org.junit.After;
23 import org.junit.Before;
24 import org.junit.Test;
25 import org.kuali.kpme.core.IntegrationTest;
26 import org.kuali.kpme.edo.EdoUnitTestBase;
27 import org.kuali.kpme.edo.api.checklist.EdoChecklistItem;
28 import org.kuali.kpme.edo.api.checklist.EdoChecklistSection;
29 import org.kuali.kpme.edo.service.EdoServiceLocator;
30
31 @IntegrationTest
32 public class EdoChecklistSectionServiceTest extends EdoUnitTestBase {
33
34 private final String edoChecklistSectionId = "1000";
35 private final String edoChecklistId = "1000";
36
37 @Before
38 public void setUp() throws Exception {
39 super.setUp();
40
41 }
42
43 @After
44 public void tearDown() throws Exception {
45 super.tearDown();
46 }
47
48 @Test
49 public void testGetEdoChecklistSectionById() throws Exception {
50
51 EdoChecklistSection edoChecklistSection = EdoServiceLocator.getChecklistSectionService().getChecklistSectionById(edoChecklistSectionId);
52 assertEquals("testEdoChecklistSection1", edoChecklistSection.getChecklistSectionName());
53 assertEquals("returned the correct number of results for items", 3, edoChecklistSection.getChecklistItems().size());
54 }
55
56 @Test
57 public void testGetChecklistItemsBySectionId() throws Exception {
58
59 List<EdoChecklistSection> sections = EdoServiceLocator.getChecklistSectionService().getChecklistSectionsByChecklistId(edoChecklistId);
60 assertEquals("returned the correct number of resultss", 2, sections.size());
61 }
62 }