View Javadoc
1   /**
2    * Copyright 2004-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.kpme.tklm.leave.accrual;
17  
18  import static org.junit.Assert.assertNull;
19  
20  import org.junit.Ignore;
21  import org.junit.Test;
22  import org.kuali.kpme.core.IntegrationTest;
23  import org.kuali.kpme.tklm.TKLMIntegrationTestCase;
24  import org.kuali.kpme.tklm.leave.accrual.bucket.KPMEAccrualCategoryBucket;
25  
26  @IntegrationTest
27  public class KPMEAccrualCategoryBucketTest extends TKLMIntegrationTestCase {
28  
29  	KPMEAccrualCategoryBucket bucket;
30  	
31  	@Override
32  	public void setUp() throws Exception {
33  		super.setUp();
34  		bucket = new KPMEAccrualCategoryBucket();//LmServiceLocator.getKPMEAccrualCategoryBucket();
35  	}
36  	
37  	@Override
38  	public void tearDown() throws Exception {
39  		super.tearDown();
40  	}
41  	
42  /*	@Test
43  	public void testInitiate() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
44  		assertNotNull(bucket);
45  		PrincipalHRAttributes principalCalendar = HrServiceLocator.getPrincipalHRAttributeService().getPrincipalCalendar("admin", DateTime.now().toLocalDate());
46  		principalCalendar.setLeavePlan("TST");
47  		bucket.initialize(principalCalendar);
48  		LinkedHashMap<String, List<LeaveBalance>> balances = bucket.getLeaveBalances();
49  		assertEquals("Map of balances should house balances for one accrual category, TEX", 1, balances.size());
50  		List<LeaveBalance> leaveBalances = balances.get("1");
51  		assertEquals("There should be 7 LeaveBalances in this list", 7, leaveBalances.size());
52  		for(LeaveBalance balance : leaveBalances) {
53  			assertTrue("This LeaveBalance should be one of the following instances",
54  					   balance instanceof AccruedLeaveBalance
55  					|| balance instanceof PendingLeaveBalance
56  					|| balance instanceof AvailableLeaveBalance
57  					|| balance instanceof YearToDateEarnedLeaveBalance
58  					|| balance instanceof YearToDateUsageLeaveBalance
59  					|| balance instanceof FmlaLeaveBalance
60  					|| balance instanceof CarryOverLeaveBalance);
61  		}
62  	}*/
63  	
64  	@Test
65  	public void testAddLeaveBlock() {
66  		assertNull(null);
67  	}
68  	
69  	@Test
70  	public void testRemoveLeaveBlock() {
71  		assertNull(null);
72  	}
73  	
74  	@Test
75  	public void testEditLeaveBlock() {
76  		assertNull(null);
77  	}
78  	
79  	@Test
80  	public void testGetLeaveBalance() {
81  		assertNull(null);
82  	}
83  	
84  	@Test
85  	@Ignore
86  	public void testGetLeaveBalanceForAccrualCategory() {
87  		assertNull(null);
88  	}
89  	
90  	@Test
91  	public void testCalculateLeaveBalanceForPreviousCalendar() {
92  		assertNull(null);
93  	}
94  	
95  	@Test
96  	public void testCalclulateLeaveBalanceForNextCalendar() {
97  		assertNull(null);
98  	}
99  
100 }