01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.labor.service;
17:
18: import java.util.List;
19: import java.util.Map;
20: import java.util.Properties;
21:
22: import org.kuali.core.service.BusinessObjectService;
23: import org.kuali.kfs.context.KualiTestBase;
24: import org.kuali.kfs.context.SpringContext;
25: import org.kuali.module.labor.bo.BenefitsCalculation;
26: import org.kuali.test.ConfigureContext;
27: import org.kuali.test.KualiTestConstants.TestConstants.BenefitsCalculationServiceImplTest;
28:
29: /**
30: * junit test for LaborBenefitsCalculationServiceImplTest
31: */
32: @ConfigureContext
33: public class LaborBenefitsCalculationServiceImplTest extends
34: KualiTestBase {
35:
36: private Properties properties;
37: private String fieldNames;
38: private String deliminator;
39: private List<String> keyFieldList;
40: private Map fieldValues;
41:
42: private LaborBenefitsCalculationService laborBenefitsCalculationService;
43: private BusinessObjectService businessObjectService;
44:
45: @Override
46: public void setUp() throws Exception {
47: super .setUp();
48: laborBenefitsCalculationService = SpringContext
49: .getBean(LaborBenefitsCalculationService.class);
50: }
51:
52: /**
53: * Test get benefits calculation method returns valid for BenefitsCalculation
54: *
55: * @throws Exception
56: */
57: public void testGetBenefitsCalculation_valid() throws Exception {
58: BenefitsCalculation benefitsCalculation = laborBenefitsCalculationService
59: .getBenefitsCalculation(
60: Integer
61: .valueOf(BenefitsCalculationServiceImplTest.FISCAL_YEAR),
62: BenefitsCalculationServiceImplTest.CHART,
63: BenefitsCalculationServiceImplTest.POSITION_TYPE_CODE);
64: super
65: .assertNotNull(
66: "Expected valid Fiscal Year Chart and Position and result was null",
67: benefitsCalculation);
68: }
69: }
|