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.gl.web.lookupable;
17:
18: import java.util.List;
19:
20: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
21: import org.kuali.test.ConfigureContext;
22:
23: /**
24: * A test that covers PendingLedgerService
25: */
26: @ConfigureContext
27: public class PendingLedgerServiceHelperServiceTest extends
28: AbstractGLLookupableHelperServiceTestBase {
29:
30: /**
31: * Tests that PendingLedgerService is successfully saving and retrieving entries
32: * @throws Exception thrown if any exception is encountered for any reason
33: */
34: public void testSave() throws Exception {
35: testDataGenerator.generateTransactionData(pendingEntry);
36:
37: getPendingEntryService().delete("TEST69999");
38: getPendingEntryService().save(pendingEntry);
39:
40: GeneralLedgerPendingEntry entry = getPendingEntryService()
41: .getByPrimaryId(new Integer(9876), "TEST69999");
42:
43: assertEquals(pendingEntry.getAccountNumber(), entry
44: .getAccountNumber());
45: assertEquals(pendingEntry.getSubAccountNumber(), entry
46: .getSubAccountNumber());
47: assertEquals(pendingEntry.getFinancialSubObjectCode(), entry
48: .getFinancialSubObjectCode());
49: assertEquals(pendingEntry.getFinancialObjectCode(), entry
50: .getFinancialObjectCode());
51: assertEquals(pendingEntry.getFinancialObjectTypeCode(), entry
52: .getFinancialObjectTypeCode());
53: assertEquals(pendingEntry.getFinancialBalanceTypeCode(), entry
54: .getFinancialBalanceTypeCode());
55: assertEquals(pendingEntry.getUniversityFiscalPeriodCode(),
56: entry.getUniversityFiscalPeriodCode());
57: assertEquals(pendingEntry.getUniversityFiscalYear(), entry
58: .getUniversityFiscalYear());
59: assertEquals(pendingEntry.getChartOfAccountsCode(), entry
60: .getChartOfAccountsCode());
61: assertEquals(pendingEntry
62: .getTransactionLedgerEntrySequenceNumber(), entry
63: .getTransactionLedgerEntrySequenceNumber());
64: assertEquals(pendingEntry.getDocumentNumber(), entry
65: .getDocumentNumber());
66: }
67:
68: /**
69: * @see org.kuali.module.gl.web.lookupable.AbstractGLLookupableTestBase#testGetSearchResults()
70: */
71: public void testGetSearchResults() throws Exception {
72: assertTrue("I'm successfully implementing an abstract method",
73: true);
74: }
75:
76: /**
77: * @see org.kuali.module.gl.web.lookupable.AbstractGLLookupableTestBase#getLookupFields(boolean)
78: */
79: public List getLookupFields(boolean isExtended) {
80: return null;
81: }
82:
83: }
|