View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.sys;
20  
21  import org.kuali.kfs.sys.context.TestUtils;
22  import org.kuali.rice.core.api.util.type.KualiDecimal;
23  
24  
25  /**
26   * provides centralized storage of constants that occur throughout the tests
27   */
28  public interface KualiTestConstants {
29  
30      /**
31       * contains Test related constants
32       */
33      public final class TestConstants {
34          private static final String HOST = "localhost";
35          private static final String PORT = "8080";
36          public static final String BASE_PATH = "http://" + HOST + ":" + PORT + "/";
37          public static final String MESSAGE = "JUNIT test entry. If this exist after the tests are not cleaning up correctly. Created by class";
38          public static final String TEST_BATCH_STAGING_DIRECTORY = "/java/projects/kuali_project/test/unit/src/org/kuali/test/staging/";
39  
40          /**
41           * group of data values that should work if used togther
42           */
43          public static class Data1 {
44              public final static String ACCOUNT_NUMBER = "9544900";
45              public final static String CHART_OF_ACCOUNTS_CODE = "BA";
46              public final static String OBJECT_CODE = "9912";
47              public final static String ORGANIZATION_CODE = "PARK";
48              public final static String PERSON_UNIVERSAL_IDENTIFIER = "4219606069";
49              public final static Integer UNIVERSITY_FISCAL_YEAR = new Integer(2004);
50  
51              public static final String OBJECT_TYPE_CODE = "AS";
52          }
53  
54          public static class Data2 {
55              public final static String AUTHENTICATION_USER_ID = "khuntley";
56              public final static String AUTHENTICATION_USER_ID_THAT_IS_SUPERVISOR = "heagle";
57          }
58  
59          public static class Data3 {
60              public static final Long DOC_HDR_ID = new Long(100000);
61              public static final String CHART = "UA";
62              public static final String ACCOUNT = "1912610";
63              public static final String SUBACCOUNT = "AUCAP";
64              public static final String OBJCODE_SOURCE = "4166";
65              public static final String SUBOBJCODE_SOURCE = "FIS";
66              public static final String OBJCODE_TARGET = "5000";
67              public static final String SUBOBJCODE_TARGET = "A/R";
68              public static final String PROJECT = "BOB";
69              public static final KualiDecimal LINEAMT = new KualiDecimal("21.12");
70              public static final String OBJECT_TYPE_CODE = "AS";
71              public static final String DEBIT_CREDIT_CODE = "D";
72              public static final String ENCUMBRANCE_UPDATE_CODE = "Y";
73  
74              public static final Integer BILLING_ITEM_QUANTITY = new Integer(5);
75              public static final String BILLING_ITEM_STOCK_DESCRIPTION = "steer";
76              public static final String BILLIING_ITEM_STOCK_NUMBER = "M000";
77              public static final Double BILLING_ITEM_UNIT_AMOUNT = new Double("2.0");
78              public static final String BILLING_ITEM_UNIT_OF_MEASUREMENT_CODE = "hd";
79              public static final Integer POSTING_YEAR = new Integer(2004);
80              public static final Integer SEQUENCE_NUMBER = new Integer(1);
81          }
82  
83          public static class Data4 {
84              public static final String ACCOUNT = "1031400";
85              public static final String ACCOUNT2 = "5731402";
86              public static final KualiDecimal AMOUNT = new KualiDecimal("2.50");
87              public static final String BALANCE_TYPE_CODE = "AC";
88              public static final String CHART_CODE = "BL";
89              public static final String CHART_CODE_UA = "UA";
90              public static final String CHART_CODE_BA = "BA";
91              public static final String DOC_HDR_ID = "1005";
92              public static final String OBJECT_CODE = "3000";
93              public static final String OBJECT_CODE2 = "5099";
94              public static final Integer POSTING_YEAR = TestUtils.getFiscalYearForTesting();
95              public static final String PROJECT_CODE = "KUL";
96              public static final Integer SEQUENCE_NUMBER = new Integer(1);
97              public static final String SUBACCOUNT = "AUCAP";
98              public static final String SUBACCOUNT2 = "ADV";
99              public static final String SUBOBJECT_CODE = "WTS";
100             public static final String OBJECT_TYPE_CODE = "AS";
101             public static final String DEBIT_CREDIT_CODE = "D";
102             public static final String ENCUMBRANCE_UPDATE_CODE = "Y";
103             public static final String ORG_REFERENCE_ID = "12345678";
104             public static final String OVERRIDE_CODE = "O";
105             public static final String REF_NUMBER = "123456789";
106             public static final String REF_ORIGIN_CODE = "AB";
107             public static final String REF_TYPE_CODE = "ABCD";
108             public static final String USER_ID1 = "vputman";
109             public static final String USER_ID2 = "khuntley";
110         }
111 
112         public static class Data5 {
113             public static final String BUDGET_AGGREGATION_CODE1 = "O";
114             public static final String BUDGET_AGGREGATION_NAME1 = "OBJECT";
115             public static final String BUDGET_AGGREGATION_CODE2 = "L";
116             public static final String BUDGET_AGGREGATION_NAME2 = "OBJECT LEVEL";
117 
118             public static final String FEDERAL_FUNDED_CODE1 = "F";
119             public static final String FEDERAL_FUNDED_NAME1 = "FEDERALLY FUNDED AND OWNED";
120             public static final String FEDERAL_FUNDED_CODE_BAD = "A";
121             public static final String FEDERAL_FUNDED_NAME_BAD = "This is a bad code name";
122         }
123 
124         public static class PositionObjectTestData {
125             public static final String UNIVERSITY_FISCAL_YEAR = "2011";
126             public static final String CHART_OF_ACCOUNTS_CODE = "SB";
127             public static final String FINANCIAL_OBJECT_CODE = "2504";
128         }
129 
130 
131         public static class BenefitsCalculationServiceImplTest {
132             public static final String FISCAL_YEAR = "2009";
133             public static final String CHART = "BA";
134             public static final String POSITION_TYPE_CODE = "B";
135         }
136         
137         public static class BankCodeTestData {
138             public static final String BANK_CODE = "TEST";
139         }
140     }
141 }
142