1
2
3
4
5 package org.kuali.student.r2.core.process;
6
7 import org.junit.After;
8 import org.junit.AfterClass;
9 import org.junit.Before;
10 import org.junit.BeforeClass;
11 import org.junit.Test;
12 import org.kuali.student.r2.common.dto.ContextInfo;
13 import org.kuali.student.r2.core.constants.PopulationServiceConstants;
14
15 import static org.junit.Assert.assertFalse;
16 import static org.junit.Assert.assertTrue;
17
18
19
20
21
22 public class ProcessPocPopulationServiceMockImplTest {
23
24 public ProcessPocPopulationServiceMockImplTest() {
25 }
26
27 @BeforeClass
28 public static void setUpClass() throws Exception {
29 }
30
31 @AfterClass
32 public static void tearDownClass() throws Exception {
33 }
34
35 @Before
36 public void setUp() {
37 }
38
39 @After
40 public void tearDown() {
41 }
42
43
44
45
46 @Test
47 public void testPocMethods() throws Exception {
48 System.out.println("test poc methods");
49
50 ContextInfo context = new ContextInfo();
51 context.setPrincipalId("POC-tester");
52
53 ProcessPocPopulationServiceMockImpl instance = new ProcessPocPopulationServiceMockImpl();
54 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_AMBER_HOPKINS_2155, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
55 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_BARBARA_HARRIS_2016, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
56 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_BETTY_MARTIN_2005, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
57 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_CLIFFORD_RIDDLE_2397, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
58 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_EDDIE_PITTMAN_2406, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
59 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_JOHNNY_MANNING_2374, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
60 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_KARA_STONE_2272, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
61 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_NINA_WELCH_2166, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
62 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_TRACY_BURTON_2132, PopulationServiceConstants.EVERYONE_POPULATION_KEY, context.getCurrentDate(), context));
63
64 assertTrue(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_AMBER_HOPKINS_2155, PopulationServiceConstants.SUMMER_ONLY_STUDENTS_POPULATION_KEY, context.getCurrentDate(), context));
65 assertFalse(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_BARBARA_HARRIS_2016, PopulationServiceConstants.SUMMER_ONLY_STUDENTS_POPULATION_KEY, context.getCurrentDate(), context));
66 assertFalse(instance.isMemberAsOfDate(ProcessPocConstants.PERSON_ID_BETTY_MARTIN_2005, PopulationServiceConstants.SUMMER_ONLY_STUDENTS_POPULATION_KEY, context.getCurrentDate(), context));
67
68 }
69 }