Source Code Cross Referenced for AccountGlobalRuleTest.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » chart » rules » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.module.chart.rules 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2007 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         * http://www.opensource.org/licenses/ecl1.php
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.kuali.module.chart.rules;
017:
018:        import static org.kuali.test.util.KualiTestAssertionUtils.assertGlobalErrorMapEmpty;
019:
020:        import org.kuali.core.document.MaintenanceDocument;
021:        import org.kuali.module.chart.bo.AccountGlobal;
022:        import org.kuali.test.ConfigureContext;
023:
024:        @ConfigureContext
025:        public class AccountGlobalRuleTest extends ChartRuleTestBase {
026:
027:            private class Accounts {
028:                private class ChartCode {
029:                    private static final String GOOD1 = "BL";
030:                    private static final String CLOSED1 = "BL";
031:                    private static final String EXPIRED1 = "BL";
032:                    private static final String GOOD2 = "UA";
033:                    private static final String BAD1 = "ZZ";
034:                }
035:
036:                private class AccountNumber {
037:                    private static final String GOOD1 = "1031400";
038:                    private static final String CLOSED1 = "2231414";
039:                    private static final String EXPIRED1 = "2231404";
040:                    private static final String BAD1 = "9999999";
041:                }
042:
043:                private class Org {
044:                    private static final String GOOD1 = "ACAD";
045:                    private static final String BAD1 = "1234";
046:                }
047:
048:                private class State {
049:                    private static final String GOOD1 = "IN";
050:                    private static final String BAD1 = "ZZ";
051:                }
052:
053:                private class Zip {
054:                    private static final String GOOD1 = "47405-3085";
055:                    private static final String BAD1 = "12345-6789";
056:                }
057:
058:                private class SubFund {
059:                    private class Code {
060:                        private static final String CG1 = "HIEDUA";
061:                        private static final String GF1 = "GENFND";
062:                        private static final String GF_MPRACT = "MPRACT";
063:                        private static final String EN1 = "ENDOW";
064:                    }
065:
066:                    private class FundGroupCode {
067:                        private static final String CG1 = "CG";
068:                        private static final String GF1 = "GF";
069:                        private static final String EN1 = "EN";
070:                    }
071:
072:                    private static final String GOOD1 = "GENFND";
073:                }
074:
075:                private class HigherEdFunction {
076:                    private static final String GOOD1 = "AC";
077:                }
078:
079:                private class User {
080:                    private class McafeeAlan {
081:                        private static final String UNIVERSAL_ID = "1509103107";
082:                        private static final String USER_ID = "AEMCAFEE";
083:                        private static final String EMP_ID = "0000000013";
084:                        private static final String NAME = "Mcafee, Alan";
085:                        private static final String EMP_STATUS = "A";
086:                        private static final String EMP_TYPE = "P";
087:                    }
088:
089:                    private class PhamAnibal {
090:                        private static final String UNIVERSAL_ID = "1195901455";
091:                        private static final String USER_ID = "AAPHAM";
092:                        private static final String EMP_ID = "0000004686";
093:                        private static final String NAME = "Pham, Anibal";
094:                        private static final String EMP_STATUS = "A";
095:                        private static final String EMP_TYPE = "P";
096:                    }
097:
098:                    private class AhlersEsteban {
099:                        private static final String UNIVERSAL_ID = "1959008511";
100:                        private static final String USER_ID = "AHLERS";
101:                        private static final String EMP_ID = "0000002820";
102:                        private static final String NAME = "Ahlers, Esteban";
103:                        private static final String EMP_STATUS = "A";
104:                        private static final String EMP_TYPE = "P";
105:                    }
106:                }
107:
108:                private class FiscalOfficer {
109:                    private static final String GOOD1 = "4318506633";
110:                }
111:
112:                private class Supervisor {
113:                    private static final String GOOD1 = "4052406505";
114:                }
115:
116:                private class Manager {
117:                    private static final String GOOD1 = "4318506633";
118:                }
119:
120:                private class UserIds {
121:                    private static final String SUPER1 = "HEAGLE";
122:                    private static final String GOOD1 = "KCOPLEY";
123:                    private static final String GOOD2 = "KHUNTLEY";
124:                }
125:            }
126:
127:            AccountGlobal newAccountGlobals;
128:            MaintenanceDocument maintDoc;
129:            AccountGlobalRule rule;
130:
131:            public void testDefaultExistenceChecks_Org_KnownGood() {
132:
133:                // create new account to test
134:                newAccountGlobals = new AccountGlobal();
135:                newAccountGlobals
136:                        .setChartOfAccountsCode(Accounts.ChartCode.GOOD1);
137:                newAccountGlobals.setOrganizationCode(Accounts.Org.GOOD1);
138:                setUsersThatExist();
139:
140:                // run the test
141:                testDefaultExistenceCheck(newAccountGlobals,
142:                        "organizationCode", false);
143:                assertGlobalErrorMapEmpty();
144:            }
145:
146:            private void setUsersThatExist() {
147:                newAccountGlobals
148:                        .setAccountManagerSystemIdentifier(Accounts.Manager.GOOD1);
149:                newAccountGlobals
150:                        .setAccountFiscalOfficerSystemIdentifier(Accounts.FiscalOfficer.GOOD1);
151:                newAccountGlobals
152:                        .setAccountsSupervisorySystemsIdentifier(Accounts.Supervisor.GOOD1);
153:            }
154:
155:            public void testDefaultExistenceChecks_AccountState_KnownGood() {
156:
157:                // create new account to test
158:                newAccountGlobals = new AccountGlobal();
159:                newAccountGlobals.setAccountStateCode(Accounts.State.GOOD1);
160:                setUsersThatExist();
161:
162:                // run the test
163:                testDefaultExistenceCheck(newAccountGlobals,
164:                        "accountStateCode", false);
165:                assertGlobalErrorMapEmpty();
166:            }
167:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.