01: /*
02: * Copyright 2006-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.kra.bo;
17:
18: import java.sql.Date;
19: import java.text.ParseException;
20: import java.text.SimpleDateFormat;
21: import java.util.ArrayList;
22: import java.util.List;
23:
24: import org.kuali.kfs.context.KualiTestBase;
25: import org.kuali.module.kra.budget.bo.BudgetPeriod;
26: import org.kuali.test.ConfigureContext;
27:
28: /**
29: * This class tests methods in BudgetNonpersonnelCopyOverFormHelper.
30: */
31: @ConfigureContext
32: public class BudgetPeriodTest extends KualiTestBase {
33:
34: public void testBudgetPeriod() {
35: assertTrue(true);
36: }
37:
38: public static List createBudgetPeriods(int numberOfPeriods) {
39: List budgetPeriods = new ArrayList();
40:
41: SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
42:
43: for (int i = 0; i < numberOfPeriods; i++) {
44: BudgetPeriod budgetPeriod = new BudgetPeriod();
45: budgetPeriod.setBudgetPeriodSequenceNumber(new Integer(i));
46: try {
47: budgetPeriod.setBudgetPeriodBeginDate(new Date(sdf
48: .parse("07/01/" + 2000 + i).getTime()));
49: budgetPeriod.setBudgetPeriodEndDate(new Date(sdf.parse(
50: "06/30/" + 2001 + i).getTime()));
51: } catch (ParseException e) {
52: throw new NullPointerException();
53: }
54: budgetPeriods.add(budgetPeriod);
55: }
56:
57: return budgetPeriods;
58: }
59: }
|