0001: /*
0002: * Copyright 2005-2007 The Kuali Foundation.
0003: *
0004: * Licensed under the Educational Community License, Version 1.0 (the "License");
0005: * you may not use this file except in compliance with the License.
0006: * You may obtain a copy of the License at
0007: *
0008: * http://www.opensource.org/licenses/ecl1.php
0009: *
0010: * Unless required by applicable law or agreed to in writing, software
0011: * distributed under the License is distributed on an "AS IS" BASIS,
0012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013: * See the License for the specific language governing permissions and
0014: * limitations under the License.
0015: */
0016: package org.kuali.module.financial.rules;
0017:
0018: import static org.kuali.module.financial.rules.IsDebitTestUtils.Amount.NEGATIVE;
0019: import static org.kuali.module.financial.rules.IsDebitTestUtils.Amount.POSITIVE;
0020: import static org.kuali.test.fixtures.UserNameFixture.KHUNTLEY;
0021:
0022: import org.kuali.core.service.DataDictionaryService;
0023: import org.kuali.core.service.DocumentService;
0024: import org.kuali.core.service.DocumentTypeService;
0025: import org.kuali.core.util.KualiDecimal;
0026: import org.kuali.kfs.bo.AccountingLine;
0027: import org.kuali.kfs.bo.SourceAccountingLine;
0028: import org.kuali.kfs.bo.TargetAccountingLine;
0029: import org.kuali.kfs.context.KualiTestBase;
0030: import org.kuali.kfs.context.SpringContext;
0031: import org.kuali.kfs.document.AccountingDocument;
0032: import org.kuali.module.financial.document.IndirectCostAdjustmentDocument;
0033: import org.kuali.test.ConfigureContext;
0034:
0035: /**
0036: * This class tests the <code>{@link IndirectCostAdjustmentDocument}</code>'s rules and PE generation. This is not currently
0037: * implemented properly. When we get to building this document, we would need to extend AccountingDocumentRuleTestBase. For now it
0038: * contains commented out old fixtures code that will need to be fitted to the new xml based fixtures framework.
0039: */
0040: @ConfigureContext(session=KHUNTLEY)
0041: public class IndirectCostAdjustmentDocumentRuleTest extends
0042: KualiTestBase {
0043: // ////////////////////////////////////////////////////////////////////////
0044: // Test methods start here //
0045: // ////////////////////////////////////////////////////////////////////////
0046:
0047: public final void testSave_nullDocument() throws Exception {
0048: boolean failedAsExpected = false;
0049:
0050: try {
0051: SpringContext.getBean(DocumentService.class).saveDocument(
0052: null);
0053: } catch (IllegalArgumentException e) {
0054: failedAsExpected = true;
0055: }
0056:
0057: assertTrue(failedAsExpected);
0058: }
0059:
0060: /**
0061: * tests an <code>IllegalStateException</code> is thrown for a positive income
0062: *
0063: * @throws Exception
0064: */
0065: public void testIsDebit_source_income_positveAmount()
0066: throws Exception {
0067: AccountingDocument accountingDocument = IsDebitTestUtils
0068: .getDocument(SpringContext
0069: .getBean(DocumentService.class),
0070: IndirectCostAdjustmentDocument.class);
0071: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0072: accountingDocument, SourceAccountingLine.class,
0073: POSITIVE);
0074:
0075: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0076: SpringContext.getBean(DocumentTypeService.class),
0077: SpringContext.getBean(DataDictionaryService.class),
0078: accountingDocument, accountingLine));
0079: }
0080:
0081: /**
0082: * tests an <code>IllegalStateException</code> for a negative income
0083: *
0084: * @throws Exception
0085: */
0086: public void testIsDebit_source_income_negativeAmount()
0087: throws Exception {
0088: AccountingDocument accountingDocument = IsDebitTestUtils
0089: .getDocument(SpringContext
0090: .getBean(DocumentService.class),
0091: IndirectCostAdjustmentDocument.class);
0092: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0093: accountingDocument, SourceAccountingLine.class,
0094: NEGATIVE);
0095:
0096: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0097: SpringContext.getBean(DocumentTypeService.class),
0098: SpringContext.getBean(DataDictionaryService.class),
0099: accountingDocument, accountingLine));
0100: }
0101:
0102: /**
0103: * tests an <code>IllegalStateException</code> is thrown for a zero income
0104: *
0105: * @throws Exception
0106: */
0107: public void testIsDebit_source_income_zeroAmount() throws Exception {
0108:
0109: AccountingDocument accountingDocument = IsDebitTestUtils
0110: .getDocument(SpringContext
0111: .getBean(DocumentService.class),
0112: IndirectCostAdjustmentDocument.class);
0113: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0114: accountingDocument, SourceAccountingLine.class,
0115: KualiDecimal.ZERO);
0116:
0117: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0118: SpringContext.getBean(DocumentTypeService.class),
0119: SpringContext.getBean(DataDictionaryService.class),
0120: accountingDocument, accountingLine));
0121: }
0122:
0123: /**
0124: * tests true is returned for a positive expense
0125: *
0126: * @throws Exception
0127: */
0128: public void testIsDebit_source_expense_positveAmount()
0129: throws Exception {
0130: AccountingDocument accountingDocument = IsDebitTestUtils
0131: .getDocument(SpringContext
0132: .getBean(DocumentService.class),
0133: IndirectCostAdjustmentDocument.class);
0134: AccountingLine accountingLine = IsDebitTestUtils
0135: .getExpenseLine(accountingDocument,
0136: SourceAccountingLine.class, POSITIVE);
0137:
0138: assertTrue(IsDebitTestUtils.isDebit(SpringContext
0139: .getBean(DocumentTypeService.class), SpringContext
0140: .getBean(DataDictionaryService.class),
0141: accountingDocument, accountingLine));
0142: }
0143:
0144: /**
0145: * tests false is returned for a negative expense
0146: *
0147: * @throws Exception
0148: */
0149: public void testIsDebit_source_expense_negativeAmount()
0150: throws Exception {
0151: AccountingDocument accountingDocument = IsDebitTestUtils
0152: .getDocument(SpringContext
0153: .getBean(DocumentService.class),
0154: IndirectCostAdjustmentDocument.class);
0155: AccountingLine accountingLine = IsDebitTestUtils
0156: .getExpenseLine(accountingDocument,
0157: SourceAccountingLine.class, NEGATIVE);
0158:
0159: assertFalse(IsDebitTestUtils.isDebit(SpringContext
0160: .getBean(DocumentTypeService.class), SpringContext
0161: .getBean(DataDictionaryService.class),
0162: accountingDocument, accountingLine));
0163: }
0164:
0165: /**
0166: * tests an <code>IllegalStateException</code> is thrown for a zero expense
0167: *
0168: * @throws Exception
0169: */
0170: public void testIsDebit_source_expense_zeroAmount()
0171: throws Exception {
0172: AccountingDocument accountingDocument = IsDebitTestUtils
0173: .getDocument(SpringContext
0174: .getBean(DocumentService.class),
0175: IndirectCostAdjustmentDocument.class);
0176: AccountingLine accountingLine = IsDebitTestUtils
0177: .getExpenseLine(accountingDocument,
0178: SourceAccountingLine.class, KualiDecimal.ZERO);
0179:
0180: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0181: SpringContext.getBean(DocumentTypeService.class),
0182: SpringContext.getBean(DataDictionaryService.class),
0183: accountingDocument, accountingLine));
0184: }
0185:
0186: /**
0187: * tests an <code>IllegalStateException</code> is thrown for a positive asset
0188: *
0189: * @throws Exception
0190: */
0191: public void testIsDebit_source_asset_positveAmount()
0192: throws Exception {
0193: AccountingDocument accountingDocument = IsDebitTestUtils
0194: .getDocument(SpringContext
0195: .getBean(DocumentService.class),
0196: IndirectCostAdjustmentDocument.class);
0197: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0198: accountingDocument, SourceAccountingLine.class,
0199: POSITIVE);
0200:
0201: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0202: SpringContext.getBean(DocumentTypeService.class),
0203: SpringContext.getBean(DataDictionaryService.class),
0204: accountingDocument, accountingLine));
0205: }
0206:
0207: /**
0208: * tests an <code>IllegalStateException</code> is thrown for a negative asset
0209: *
0210: * @throws Exception
0211: */
0212: public void testIsDebit_source_asset_negativeAmount()
0213: throws Exception {
0214: AccountingDocument accountingDocument = IsDebitTestUtils
0215: .getDocument(SpringContext
0216: .getBean(DocumentService.class),
0217: IndirectCostAdjustmentDocument.class);
0218: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0219: accountingDocument, SourceAccountingLine.class,
0220: NEGATIVE);
0221:
0222: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0223: SpringContext.getBean(DocumentTypeService.class),
0224: SpringContext.getBean(DataDictionaryService.class),
0225: accountingDocument, accountingLine));
0226: }
0227:
0228: /**
0229: * tests an <code>IllegalStateException</code> is thrown for a zero asset
0230: *
0231: * @throws Exception
0232: */
0233: public void testIsDebit_source_asset_zeroAmount() throws Exception {
0234: AccountingDocument accountingDocument = IsDebitTestUtils
0235: .getDocument(SpringContext
0236: .getBean(DocumentService.class),
0237: IndirectCostAdjustmentDocument.class);
0238: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0239: accountingDocument, SourceAccountingLine.class,
0240: KualiDecimal.ZERO);
0241:
0242: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0243: SpringContext.getBean(DocumentTypeService.class),
0244: SpringContext.getBean(DataDictionaryService.class),
0245: accountingDocument, accountingLine));
0246: }
0247:
0248: /**
0249: * tests an <code>IllegalStateException</code> is thrown for a positive liability
0250: *
0251: * @throws Exception
0252: */
0253: public void testIsDebit_source_liability_positveAmount()
0254: throws Exception {
0255: AccountingDocument accountingDocument = IsDebitTestUtils
0256: .getDocument(SpringContext
0257: .getBean(DocumentService.class),
0258: IndirectCostAdjustmentDocument.class);
0259: AccountingLine accountingLine = IsDebitTestUtils
0260: .getLiabilityLine(accountingDocument,
0261: SourceAccountingLine.class, POSITIVE);
0262:
0263: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0264: SpringContext.getBean(DocumentTypeService.class),
0265: SpringContext.getBean(DataDictionaryService.class),
0266: accountingDocument, accountingLine));
0267: }
0268:
0269: /**
0270: * tests an <code>IllegalStateException</code> is thrown for a negative liability
0271: *
0272: * @throws Exception
0273: */
0274: public void testIsDebit_source_liability_negativeAmount()
0275: throws Exception {
0276: AccountingDocument accountingDocument = IsDebitTestUtils
0277: .getDocument(SpringContext
0278: .getBean(DocumentService.class),
0279: IndirectCostAdjustmentDocument.class);
0280: AccountingLine accountingLine = IsDebitTestUtils
0281: .getLiabilityLine(accountingDocument,
0282: SourceAccountingLine.class, NEGATIVE);
0283:
0284: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0285: SpringContext.getBean(DocumentTypeService.class),
0286: SpringContext.getBean(DataDictionaryService.class),
0287: accountingDocument, accountingLine));
0288: }
0289:
0290: /**
0291: * tests an <code>IllegalStateException</code> is thrown for a zero liability
0292: *
0293: * @throws Exception
0294: */
0295: public void testIsDebit_source_liability_zeroAmount()
0296: throws Exception {
0297: AccountingDocument accountingDocument = IsDebitTestUtils
0298: .getDocument(SpringContext
0299: .getBean(DocumentService.class),
0300: IndirectCostAdjustmentDocument.class);
0301: AccountingLine accountingLine = IsDebitTestUtils
0302: .getLiabilityLine(accountingDocument,
0303: SourceAccountingLine.class, KualiDecimal.ZERO);
0304:
0305: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0306: SpringContext.getBean(DocumentTypeService.class),
0307: SpringContext.getBean(DataDictionaryService.class),
0308: accountingDocument, accountingLine));
0309: }
0310:
0311: /**
0312: * tests false is returned for a positive income
0313: *
0314: * @throws Exception
0315: */
0316: public void testIsDebit_target_income_positveAmount()
0317: throws Exception {
0318: AccountingDocument accountingDocument = IsDebitTestUtils
0319: .getDocument(SpringContext
0320: .getBean(DocumentService.class),
0321: IndirectCostAdjustmentDocument.class);
0322: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0323: accountingDocument, TargetAccountingLine.class,
0324: POSITIVE);
0325:
0326: assertFalse(IsDebitTestUtils.isDebit(SpringContext
0327: .getBean(DocumentTypeService.class), SpringContext
0328: .getBean(DataDictionaryService.class),
0329: accountingDocument, accountingLine));
0330: }
0331:
0332: /**
0333: * tests true is returned for a negative income
0334: *
0335: * @throws Exception
0336: */
0337: public void testIsDebit_target_income_negativeAmount()
0338: throws Exception {
0339: AccountingDocument accountingDocument = IsDebitTestUtils
0340: .getDocument(SpringContext
0341: .getBean(DocumentService.class),
0342: IndirectCostAdjustmentDocument.class);
0343: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0344: accountingDocument, TargetAccountingLine.class,
0345: NEGATIVE);
0346:
0347: assertTrue(IsDebitTestUtils.isDebit(SpringContext
0348: .getBean(DocumentTypeService.class), SpringContext
0349: .getBean(DataDictionaryService.class),
0350: accountingDocument, accountingLine));
0351: }
0352:
0353: /**
0354: * tests an <code>IllegalStateException</code> is thrown for a zero income
0355: *
0356: * @throws Exception
0357: */
0358: public void testIsDebit_target_income_zeroAmount() throws Exception {
0359:
0360: AccountingDocument accountingDocument = IsDebitTestUtils
0361: .getDocument(SpringContext
0362: .getBean(DocumentService.class),
0363: IndirectCostAdjustmentDocument.class);
0364: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0365: accountingDocument, TargetAccountingLine.class,
0366: KualiDecimal.ZERO);
0367:
0368: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0369: SpringContext.getBean(DocumentTypeService.class),
0370: SpringContext.getBean(DataDictionaryService.class),
0371: accountingDocument, accountingLine));
0372: }
0373:
0374: /**
0375: * tests an <code>IllegalStateException</code> is thrnow for a positive expense
0376: *
0377: * @throws Exception
0378: */
0379: public void testIsDebit_target_expense_positveAmount()
0380: throws Exception {
0381: AccountingDocument accountingDocument = IsDebitTestUtils
0382: .getDocument(SpringContext
0383: .getBean(DocumentService.class),
0384: IndirectCostAdjustmentDocument.class);
0385: AccountingLine accountingLine = IsDebitTestUtils
0386: .getExpenseLine(accountingDocument,
0387: TargetAccountingLine.class, POSITIVE);
0388:
0389: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0390: SpringContext.getBean(DocumentTypeService.class),
0391: SpringContext.getBean(DataDictionaryService.class),
0392: accountingDocument, accountingLine));
0393: }
0394:
0395: /**
0396: * tests an <code>IllegalStateException</code> is thrown for a negative expense
0397: *
0398: * @throws Exception
0399: */
0400: public void testIsDebit_target_expense_negativeAmount()
0401: throws Exception {
0402: AccountingDocument accountingDocument = IsDebitTestUtils
0403: .getDocument(SpringContext
0404: .getBean(DocumentService.class),
0405: IndirectCostAdjustmentDocument.class);
0406: AccountingLine accountingLine = IsDebitTestUtils
0407: .getExpenseLine(accountingDocument,
0408: TargetAccountingLine.class, NEGATIVE);
0409:
0410: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0411: SpringContext.getBean(DocumentTypeService.class),
0412: SpringContext.getBean(DataDictionaryService.class),
0413: accountingDocument, accountingLine));
0414: }
0415:
0416: /**
0417: * tests an <code>IllegalStateException</code> is thrown for a zero expense
0418: *
0419: * @throws Exception
0420: */
0421: public void testIsDebit_target_expense_zeroAmount()
0422: throws Exception {
0423: AccountingDocument accountingDocument = IsDebitTestUtils
0424: .getDocument(SpringContext
0425: .getBean(DocumentService.class),
0426: IndirectCostAdjustmentDocument.class);
0427: AccountingLine accountingLine = IsDebitTestUtils
0428: .getExpenseLine(accountingDocument,
0429: TargetAccountingLine.class, KualiDecimal.ZERO);
0430:
0431: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0432: SpringContext.getBean(DocumentTypeService.class),
0433: SpringContext.getBean(DataDictionaryService.class),
0434: accountingDocument, accountingLine));
0435: }
0436:
0437: /**
0438: * tests an <code>IllegalStateException</code> is thrown for a positive asset
0439: *
0440: * @throws Exception
0441: */
0442: public void testIsDebit_target_asset_positveAmount()
0443: throws Exception {
0444: AccountingDocument accountingDocument = IsDebitTestUtils
0445: .getDocument(SpringContext
0446: .getBean(DocumentService.class),
0447: IndirectCostAdjustmentDocument.class);
0448: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0449: accountingDocument, TargetAccountingLine.class,
0450: POSITIVE);
0451:
0452: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0453: SpringContext.getBean(DocumentTypeService.class),
0454: SpringContext.getBean(DataDictionaryService.class),
0455: accountingDocument, accountingLine));
0456: }
0457:
0458: /**
0459: * tests an <code>IllegalStateException</code> is thrnow for a negative asset
0460: *
0461: * @throws Exception
0462: */
0463: public void testIsDebit_target_asset_negativeAmount()
0464: throws Exception {
0465: AccountingDocument accountingDocument = IsDebitTestUtils
0466: .getDocument(SpringContext
0467: .getBean(DocumentService.class),
0468: IndirectCostAdjustmentDocument.class);
0469: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0470: accountingDocument, TargetAccountingLine.class,
0471: NEGATIVE);
0472:
0473: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0474: SpringContext.getBean(DocumentTypeService.class),
0475: SpringContext.getBean(DataDictionaryService.class),
0476: accountingDocument, accountingLine));
0477: }
0478:
0479: /**
0480: * tests an <code>IllegalStateException</code> is thrown for a zero asset
0481: *
0482: * @throws Exception
0483: */
0484: public void testIsDebit_target_asset_zeroAmount() throws Exception {
0485: AccountingDocument accountingDocument = IsDebitTestUtils
0486: .getDocument(SpringContext
0487: .getBean(DocumentService.class),
0488: IndirectCostAdjustmentDocument.class);
0489: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0490: accountingDocument, TargetAccountingLine.class,
0491: KualiDecimal.ZERO);
0492:
0493: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0494: SpringContext.getBean(DocumentTypeService.class),
0495: SpringContext.getBean(DataDictionaryService.class),
0496: accountingDocument, accountingLine));
0497: }
0498:
0499: /**
0500: * tests an <code>IllegalStateException</code> is thrown for a positive liability
0501: *
0502: * @throws Exception
0503: */
0504: public void testIsDebit_target_liability_positveAmount()
0505: throws Exception {
0506: AccountingDocument accountingDocument = IsDebitTestUtils
0507: .getDocument(SpringContext
0508: .getBean(DocumentService.class),
0509: IndirectCostAdjustmentDocument.class);
0510: AccountingLine accountingLine = IsDebitTestUtils
0511: .getLiabilityLine(accountingDocument,
0512: TargetAccountingLine.class, POSITIVE);
0513:
0514: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0515: SpringContext.getBean(DocumentTypeService.class),
0516: SpringContext.getBean(DataDictionaryService.class),
0517: accountingDocument, accountingLine));
0518: }
0519:
0520: /**
0521: * tests an <code>IllegalStateException</code> is thrown for a negative liability
0522: *
0523: * @throws Exception
0524: */
0525: public void testIsDebit_target_liability_negativeAmount()
0526: throws Exception {
0527: AccountingDocument accountingDocument = IsDebitTestUtils
0528: .getDocument(SpringContext
0529: .getBean(DocumentService.class),
0530: IndirectCostAdjustmentDocument.class);
0531: AccountingLine accountingLine = IsDebitTestUtils
0532: .getLiabilityLine(accountingDocument,
0533: TargetAccountingLine.class, NEGATIVE);
0534:
0535: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0536: SpringContext.getBean(DocumentTypeService.class),
0537: SpringContext.getBean(DataDictionaryService.class),
0538: accountingDocument, accountingLine));
0539: }
0540:
0541: /**
0542: * tests an <code>IllegalStateException</code> is thrown for a zero liability
0543: *
0544: * @throws Exception
0545: */
0546: public void testIsDebit_target_liability_zeroAmount()
0547: throws Exception {
0548: AccountingDocument accountingDocument = IsDebitTestUtils
0549: .getDocument(SpringContext
0550: .getBean(DocumentService.class),
0551: IndirectCostAdjustmentDocument.class);
0552: AccountingLine accountingLine = IsDebitTestUtils
0553: .getLiabilityLine(accountingDocument,
0554: TargetAccountingLine.class, KualiDecimal.ZERO);
0555:
0556: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0557: SpringContext.getBean(DocumentTypeService.class),
0558: SpringContext.getBean(DataDictionaryService.class),
0559: accountingDocument, accountingLine));
0560: }
0561:
0562: /**
0563: * tests an <code>IllegalStateException</code> is thrown for a positive income
0564: *
0565: * @throws Exception
0566: */
0567: public void testIsDebit_errorCorrection_source_income_positveAmount()
0568: throws Exception {
0569: AccountingDocument accountingDocument = IsDebitTestUtils
0570: .getErrorCorrectionDocument(SpringContext
0571: .getBean(DocumentService.class),
0572: IndirectCostAdjustmentDocument.class);
0573: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0574: accountingDocument, SourceAccountingLine.class,
0575: POSITIVE);
0576:
0577: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0578: SpringContext.getBean(DocumentTypeService.class),
0579: SpringContext.getBean(DataDictionaryService.class),
0580: accountingDocument, accountingLine));
0581: }
0582:
0583: /**
0584: * tests an <code>IllegalStateException</code> is thrown for a negative income
0585: *
0586: * @throws Exception
0587: */
0588: public void testIsDebit_errorCorrection_source_income_negativeAmount()
0589: throws Exception {
0590: AccountingDocument accountingDocument = IsDebitTestUtils
0591: .getErrorCorrectionDocument(SpringContext
0592: .getBean(DocumentService.class),
0593: IndirectCostAdjustmentDocument.class);
0594: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0595: accountingDocument, SourceAccountingLine.class,
0596: NEGATIVE);
0597:
0598: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0599: SpringContext.getBean(DocumentTypeService.class),
0600: SpringContext.getBean(DataDictionaryService.class),
0601: accountingDocument, accountingLine));
0602: }
0603:
0604: /**
0605: * tests an <code>IllegalStateException</code> is thrown for a zero income
0606: *
0607: * @throws Exception
0608: */
0609: public void testIsDebit_errorCorrection_source_income_zeroAmount()
0610: throws Exception {
0611:
0612: AccountingDocument accountingDocument = IsDebitTestUtils
0613: .getErrorCorrectionDocument(SpringContext
0614: .getBean(DocumentService.class),
0615: IndirectCostAdjustmentDocument.class);
0616: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0617: accountingDocument, SourceAccountingLine.class,
0618: KualiDecimal.ZERO);
0619:
0620: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0621: SpringContext.getBean(DocumentTypeService.class),
0622: SpringContext.getBean(DataDictionaryService.class),
0623: accountingDocument, accountingLine));
0624: }
0625:
0626: /**
0627: * tests true is returned for positive expense
0628: *
0629: * @throws Exception
0630: */
0631: public void testIsDebit_errorCorrection_source_expense_positveAmount()
0632: throws Exception {
0633: AccountingDocument accountingDocument = IsDebitTestUtils
0634: .getErrorCorrectionDocument(SpringContext
0635: .getBean(DocumentService.class),
0636: IndirectCostAdjustmentDocument.class);
0637: AccountingLine accountingLine = IsDebitTestUtils
0638: .getExpenseLine(accountingDocument,
0639: SourceAccountingLine.class, POSITIVE);
0640:
0641: assertTrue(IsDebitTestUtils.isDebit(SpringContext
0642: .getBean(DocumentTypeService.class), SpringContext
0643: .getBean(DataDictionaryService.class),
0644: accountingDocument, accountingLine));
0645: }
0646:
0647: /**
0648: * tests false is returned for a negative expense
0649: *
0650: * @throws Exception
0651: */
0652: public void testIsDebit_errorCorrection_source_expense_negativeAmount()
0653: throws Exception {
0654: AccountingDocument accountingDocument = IsDebitTestUtils
0655: .getErrorCorrectionDocument(SpringContext
0656: .getBean(DocumentService.class),
0657: IndirectCostAdjustmentDocument.class);
0658: AccountingLine accountingLine = IsDebitTestUtils
0659: .getExpenseLine(accountingDocument,
0660: SourceAccountingLine.class, NEGATIVE);
0661:
0662: assertFalse(IsDebitTestUtils.isDebit(SpringContext
0663: .getBean(DocumentTypeService.class), SpringContext
0664: .getBean(DataDictionaryService.class),
0665: accountingDocument, accountingLine));
0666: }
0667:
0668: /**
0669: * tests an <code>IllegalStateException</code> is thrown for a zero expense
0670: *
0671: * @throws Exception
0672: */
0673: public void testIsDebit_errorCorrection_source_expense_zeroAmount()
0674: throws Exception {
0675: AccountingDocument accountingDocument = IsDebitTestUtils
0676: .getErrorCorrectionDocument(SpringContext
0677: .getBean(DocumentService.class),
0678: IndirectCostAdjustmentDocument.class);
0679: AccountingLine accountingLine = IsDebitTestUtils
0680: .getExpenseLine(accountingDocument,
0681: SourceAccountingLine.class, KualiDecimal.ZERO);
0682:
0683: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0684: SpringContext.getBean(DocumentTypeService.class),
0685: SpringContext.getBean(DataDictionaryService.class),
0686: accountingDocument, accountingLine));
0687: }
0688:
0689: /**
0690: * tests an <code>IllegalStateException</code> is thrown for a positive asset
0691: *
0692: * @throws Exception
0693: */
0694: public void testIsDebit_errorCorrection_source_asset_positveAmount()
0695: throws Exception {
0696: AccountingDocument accountingDocument = IsDebitTestUtils
0697: .getErrorCorrectionDocument(SpringContext
0698: .getBean(DocumentService.class),
0699: IndirectCostAdjustmentDocument.class);
0700: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0701: accountingDocument, SourceAccountingLine.class,
0702: POSITIVE);
0703:
0704: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0705: SpringContext.getBean(DocumentTypeService.class),
0706: SpringContext.getBean(DataDictionaryService.class),
0707: accountingDocument, accountingLine));
0708: }
0709:
0710: /**
0711: * tests an <code>IllegalStateException</code> is thrown for a negative asset
0712: *
0713: * @throws Exception
0714: */
0715: public void testIsDebit_errorCorrection_source_asset_negativeAmount()
0716: throws Exception {
0717: AccountingDocument accountingDocument = IsDebitTestUtils
0718: .getErrorCorrectionDocument(SpringContext
0719: .getBean(DocumentService.class),
0720: IndirectCostAdjustmentDocument.class);
0721: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0722: accountingDocument, SourceAccountingLine.class,
0723: NEGATIVE);
0724:
0725: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0726: SpringContext.getBean(DocumentTypeService.class),
0727: SpringContext.getBean(DataDictionaryService.class),
0728: accountingDocument, accountingLine));
0729: }
0730:
0731: /**
0732: * tests an <code>IllegalStateException</code> is thrown for a zero asset
0733: *
0734: * @throws Exception
0735: */
0736: public void testIsDebit_errorCorrection_source_asset_zeroAmount()
0737: throws Exception {
0738: AccountingDocument accountingDocument = IsDebitTestUtils
0739: .getErrorCorrectionDocument(SpringContext
0740: .getBean(DocumentService.class),
0741: IndirectCostAdjustmentDocument.class);
0742: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0743: accountingDocument, SourceAccountingLine.class,
0744: KualiDecimal.ZERO);
0745:
0746: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0747: SpringContext.getBean(DocumentTypeService.class),
0748: SpringContext.getBean(DataDictionaryService.class),
0749: accountingDocument, accountingLine));
0750: }
0751:
0752: /**
0753: * tests an <code>IllegalStateException</code> for a positive liability
0754: *
0755: * @throws Exception
0756: */
0757: public void testIsDebit_errorCorrection_source_liability_positveAmount()
0758: throws Exception {
0759: AccountingDocument accountingDocument = IsDebitTestUtils
0760: .getErrorCorrectionDocument(SpringContext
0761: .getBean(DocumentService.class),
0762: IndirectCostAdjustmentDocument.class);
0763: AccountingLine accountingLine = IsDebitTestUtils
0764: .getLiabilityLine(accountingDocument,
0765: SourceAccountingLine.class, POSITIVE);
0766:
0767: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0768: SpringContext.getBean(DocumentTypeService.class),
0769: SpringContext.getBean(DataDictionaryService.class),
0770: accountingDocument, accountingLine));
0771: }
0772:
0773: /**
0774: * tests an <code>IllegalStateException</code> for a negative liability
0775: *
0776: * @throws Exception
0777: */
0778: public void testIsDebit_errorCorrection_source_liability_negativeAmount()
0779: throws Exception {
0780: AccountingDocument accountingDocument = IsDebitTestUtils
0781: .getErrorCorrectionDocument(SpringContext
0782: .getBean(DocumentService.class),
0783: IndirectCostAdjustmentDocument.class);
0784: AccountingLine accountingLine = IsDebitTestUtils
0785: .getLiabilityLine(accountingDocument,
0786: SourceAccountingLine.class, NEGATIVE);
0787:
0788: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0789: SpringContext.getBean(DocumentTypeService.class),
0790: SpringContext.getBean(DataDictionaryService.class),
0791: accountingDocument, accountingLine));
0792: }
0793:
0794: /**
0795: * tests an <code>IllegalStateException</code> is thrown for a zero liability
0796: *
0797: * @throws Exception
0798: */
0799: public void testIsDebit_errorCorrection_source_liability_zeroAmount()
0800: throws Exception {
0801: AccountingDocument accountingDocument = IsDebitTestUtils
0802: .getErrorCorrectionDocument(SpringContext
0803: .getBean(DocumentService.class),
0804: IndirectCostAdjustmentDocument.class);
0805: AccountingLine accountingLine = IsDebitTestUtils
0806: .getLiabilityLine(accountingDocument,
0807: SourceAccountingLine.class, KualiDecimal.ZERO);
0808:
0809: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0810: SpringContext.getBean(DocumentTypeService.class),
0811: SpringContext.getBean(DataDictionaryService.class),
0812: accountingDocument, accountingLine));
0813: }
0814:
0815: /**
0816: * tests false is returned for a positive income
0817: *
0818: * @throws Exception
0819: */
0820: public void testIsDebit_errorCorrection_target_income_positveAmount()
0821: throws Exception {
0822: AccountingDocument accountingDocument = IsDebitTestUtils
0823: .getErrorCorrectionDocument(SpringContext
0824: .getBean(DocumentService.class),
0825: IndirectCostAdjustmentDocument.class);
0826: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0827: accountingDocument, TargetAccountingLine.class,
0828: POSITIVE);
0829:
0830: assertFalse(IsDebitTestUtils.isDebit(SpringContext
0831: .getBean(DocumentTypeService.class), SpringContext
0832: .getBean(DataDictionaryService.class),
0833: accountingDocument, accountingLine));
0834: }
0835:
0836: /**
0837: * tests true is returned for a negative income
0838: *
0839: * @throws Exception
0840: */
0841: public void testIsDebit_errorCorrection_target_income_negativeAmount()
0842: throws Exception {
0843: AccountingDocument accountingDocument = IsDebitTestUtils
0844: .getErrorCorrectionDocument(SpringContext
0845: .getBean(DocumentService.class),
0846: IndirectCostAdjustmentDocument.class);
0847: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0848: accountingDocument, TargetAccountingLine.class,
0849: NEGATIVE);
0850:
0851: assertTrue(IsDebitTestUtils.isDebit(SpringContext
0852: .getBean(DocumentTypeService.class), SpringContext
0853: .getBean(DataDictionaryService.class),
0854: accountingDocument, accountingLine));
0855: }
0856:
0857: /**
0858: * tests an <code>IllegalStateException</code> is thrown for a zero income
0859: *
0860: * @throws Exception
0861: */
0862: public void testIsDebit_errorCorrection_target_income_zeroAmount()
0863: throws Exception {
0864:
0865: AccountingDocument accountingDocument = IsDebitTestUtils
0866: .getErrorCorrectionDocument(SpringContext
0867: .getBean(DocumentService.class),
0868: IndirectCostAdjustmentDocument.class);
0869: AccountingLine accountingLine = IsDebitTestUtils.getIncomeLine(
0870: accountingDocument, TargetAccountingLine.class,
0871: KualiDecimal.ZERO);
0872:
0873: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0874: SpringContext.getBean(DocumentTypeService.class),
0875: SpringContext.getBean(DataDictionaryService.class),
0876: accountingDocument, accountingLine));
0877: }
0878:
0879: /**
0880: * tests an <code>IllegalStateException</code> is thrown for a positive expense
0881: *
0882: * @throws Exception
0883: */
0884: public void testIsDebit_errorCorrection_target_expense_positveAmount()
0885: throws Exception {
0886: AccountingDocument accountingDocument = IsDebitTestUtils
0887: .getErrorCorrectionDocument(SpringContext
0888: .getBean(DocumentService.class),
0889: IndirectCostAdjustmentDocument.class);
0890: AccountingLine accountingLine = IsDebitTestUtils
0891: .getExpenseLine(accountingDocument,
0892: TargetAccountingLine.class, POSITIVE);
0893:
0894: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0895: SpringContext.getBean(DocumentTypeService.class),
0896: SpringContext.getBean(DataDictionaryService.class),
0897: accountingDocument, accountingLine));
0898: }
0899:
0900: /**
0901: * tests an <code>IllegalStateExcpetion</code> is thrown for a negative expense
0902: *
0903: * @throws Exception
0904: */
0905: public void testIsDebit_errorCorrection_target_expense_negativeAmount()
0906: throws Exception {
0907: AccountingDocument accountingDocument = IsDebitTestUtils
0908: .getErrorCorrectionDocument(SpringContext
0909: .getBean(DocumentService.class),
0910: IndirectCostAdjustmentDocument.class);
0911: AccountingLine accountingLine = IsDebitTestUtils
0912: .getExpenseLine(accountingDocument,
0913: TargetAccountingLine.class, NEGATIVE);
0914:
0915: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0916: SpringContext.getBean(DocumentTypeService.class),
0917: SpringContext.getBean(DataDictionaryService.class),
0918: accountingDocument, accountingLine));
0919: }
0920:
0921: /**
0922: * tests an <code>IllegalStateException</code> is thrown for a zero expense
0923: *
0924: * @throws Exception
0925: */
0926: public void testIsDebit_errorCorrection_target_expense_zeroAmount()
0927: throws Exception {
0928: AccountingDocument accountingDocument = IsDebitTestUtils
0929: .getErrorCorrectionDocument(SpringContext
0930: .getBean(DocumentService.class),
0931: IndirectCostAdjustmentDocument.class);
0932: AccountingLine accountingLine = IsDebitTestUtils
0933: .getExpenseLine(accountingDocument,
0934: TargetAccountingLine.class, KualiDecimal.ZERO);
0935:
0936: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0937: SpringContext.getBean(DocumentTypeService.class),
0938: SpringContext.getBean(DataDictionaryService.class),
0939: accountingDocument, accountingLine));
0940: }
0941:
0942: /**
0943: * tests an <code>IllegalStateException</code> is thrown for a positive asset
0944: *
0945: * @throws Exception
0946: */
0947: public void testIsDebit_errorCorrection_target_asset_positveAmount()
0948: throws Exception {
0949: AccountingDocument accountingDocument = IsDebitTestUtils
0950: .getErrorCorrectionDocument(SpringContext
0951: .getBean(DocumentService.class),
0952: IndirectCostAdjustmentDocument.class);
0953: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0954: accountingDocument, TargetAccountingLine.class,
0955: POSITIVE);
0956:
0957: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0958: SpringContext.getBean(DocumentTypeService.class),
0959: SpringContext.getBean(DataDictionaryService.class),
0960: accountingDocument, accountingLine));
0961: }
0962:
0963: /**
0964: * tests an <code>IllegalStateException</code> is thrown for a negative asset
0965: *
0966: * @throws Exception
0967: */
0968: public void testIsDebit_errorCorrection_target_asset_negativeAmount()
0969: throws Exception {
0970: AccountingDocument accountingDocument = IsDebitTestUtils
0971: .getErrorCorrectionDocument(SpringContext
0972: .getBean(DocumentService.class),
0973: IndirectCostAdjustmentDocument.class);
0974: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0975: accountingDocument, TargetAccountingLine.class,
0976: NEGATIVE);
0977:
0978: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
0979: SpringContext.getBean(DocumentTypeService.class),
0980: SpringContext.getBean(DataDictionaryService.class),
0981: accountingDocument, accountingLine));
0982: }
0983:
0984: /**
0985: * tests an <code>IllegalStateException</code> is thrown for a zero asset
0986: *
0987: * @throws Exception
0988: */
0989: public void testIsDebit_errorCorrection_target_asset_zeroAmount()
0990: throws Exception {
0991: AccountingDocument accountingDocument = IsDebitTestUtils
0992: .getErrorCorrectionDocument(SpringContext
0993: .getBean(DocumentService.class),
0994: IndirectCostAdjustmentDocument.class);
0995: AccountingLine accountingLine = IsDebitTestUtils.getAssetLine(
0996: accountingDocument, TargetAccountingLine.class,
0997: KualiDecimal.ZERO);
0998:
0999: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
1000: SpringContext.getBean(DocumentTypeService.class),
1001: SpringContext.getBean(DataDictionaryService.class),
1002: accountingDocument, accountingLine));
1003: }
1004:
1005: /**
1006: * tests an <code>IllegalStateException</code> is thrown for a positive liability
1007: *
1008: * @throws Exception
1009: */
1010: public void testIsDebit_errorCorrection_target_liability_positveAmount()
1011: throws Exception {
1012: AccountingDocument accountingDocument = IsDebitTestUtils
1013: .getErrorCorrectionDocument(SpringContext
1014: .getBean(DocumentService.class),
1015: IndirectCostAdjustmentDocument.class);
1016: AccountingLine accountingLine = IsDebitTestUtils
1017: .getLiabilityLine(accountingDocument,
1018: TargetAccountingLine.class, POSITIVE);
1019:
1020: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
1021: SpringContext.getBean(DocumentTypeService.class),
1022: SpringContext.getBean(DataDictionaryService.class),
1023: accountingDocument, accountingLine));
1024: }
1025:
1026: /**
1027: * tests an <code>IllegalStateException</code> is throw for a negative liability
1028: *
1029: * @throws Exception
1030: */
1031: public void testIsDebit_errorCorrection_target_liability_negativeAmount()
1032: throws Exception {
1033: AccountingDocument accountingDocument = IsDebitTestUtils
1034: .getErrorCorrectionDocument(SpringContext
1035: .getBean(DocumentService.class),
1036: IndirectCostAdjustmentDocument.class);
1037: AccountingLine accountingLine = IsDebitTestUtils
1038: .getLiabilityLine(accountingDocument,
1039: TargetAccountingLine.class, NEGATIVE);
1040:
1041: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
1042: SpringContext.getBean(DocumentTypeService.class),
1043: SpringContext.getBean(DataDictionaryService.class),
1044: accountingDocument, accountingLine));
1045: }
1046:
1047: /**
1048: * tests an <code>IllegalStateException</code> is thrown for a zero liability
1049: *
1050: * @throws Exception
1051: */
1052: public void testIsDebit_errorCorrection_target_liability_zeroAmount()
1053: throws Exception {
1054: AccountingDocument accountingDocument = IsDebitTestUtils
1055: .getErrorCorrectionDocument(SpringContext
1056: .getBean(DocumentService.class),
1057: IndirectCostAdjustmentDocument.class);
1058: AccountingLine accountingLine = IsDebitTestUtils
1059: .getLiabilityLine(accountingDocument,
1060: TargetAccountingLine.class, KualiDecimal.ZERO);
1061:
1062: assertTrue(IsDebitTestUtils.isDebitIllegalStateException(
1063: SpringContext.getBean(DocumentTypeService.class),
1064: SpringContext.getBean(DataDictionaryService.class),
1065: accountingDocument, accountingLine));
1066: }
1067:
1068: /*
1069: * TODO This was taken from the old fixtures class and contains valuable data that we should use when we get around to building
1070: * this document. This should be put into the new xml fixtures framework though. public void fixturesDefault() { addFixture(
1071: * KualiRuleTestCase.ACCOUNT, "1912610" ); addFixture( KualiRuleTestCase.BALANCE_TYPE,
1072: * AccountingDocumentRuleBase.BALANCE_TYPE_CODE.ACTUAL ); addFixture( KualiRuleTestCase.CHART, "UA" ); addFixture(
1073: * KualiRuleTestCase.OBJECT_TYPE_CODE, AccountingDocumentRuleBase.OBJECT_TYPE_CODE.CASH_NOT_INCOME ); addFixture(
1074: * KualiRuleTestCase.POSTING_YEAR, new Integer( 2005 ) ); addFixture( KualiRuleTestCase.PROJECT, "BOB" ); addFixture(
1075: * KualiRuleTestCase.SUBACCOUNT, "BEER" ); } public void fixturesPartiallyLoadedDoc() throws Exception { List sourceLines = new
1076: * ArrayList(); List targetLines = new ArrayList(); addFixture( KualiRuleTestCase.CHART, "UA" ); addFixture(
1077: * KualiRuleTestCase.ACCOUNT, "1912610" ); addFixture( KualiRuleTestCase.SUBACCOUNT, "BEER" ); addFixture(
1078: * KualiRuleTestCase.PROJECT, "BOB" ); addFixture( KualiRuleTestCase.DOCUMENT_DESCRIPTION, "test" ); addFixture(
1079: * KualiRuleTestCase.EXPLANATION, "This is a test document, " + "testing valid accounting line business rules." ); addFixture(
1080: * KualiRuleTestCase.OBJECT_CODE, "9912" ); sourceLines.add( fixtureSourceAccountingLine( null, "1000" ) ); addFixture(
1081: * KualiRuleTestCase.SOURCE_ACCOUNTING_LINES, sourceLines ); addFixture( KualiRuleTestCase.OBJECT_CODE, "9903" );
1082: * targetLines.add( fixtureTargetAccountingLine( null, "1000" ) ); addFixture( KualiRuleTestCase.TARGET_ACCOUNTING_LINES,
1083: * targetLines ); } public void fixturesApplyAddAccountingLineBusinessRulesInvalidSubObjectCode() throws Exception { List
1084: * sourceLines = new ArrayList(); List targetLines = new ArrayList(); addFixture( KualiRuleTestCase.DOCUMENT_DESCRIPTION, "test" );
1085: * addFixture( KualiRuleTestCase.EXPLANATION, "This is a test document, testing valid " + "accounting line business rules." );
1086: * sourceLines.add( fixtureSourceAccountingLine( "9897", "1000" ) ); sourceLines.add( fixtureSourceAccountingLine( "9889",
1087: * "1000" ) ); addFixture( KualiRuleTestCase.SOURCE_ACCOUNTING_LINES, sourceLines ); targetLines.add(
1088: * fixtureTargetAccountingLine( "9891", "1000" ) ); targetLines.add( fixtureTargetAccountingLine( "9760", "1000" ) );
1089: * addFixture( KualiRuleTestCase.TARGET_ACCOUNTING_LINES, targetLines ); } public void
1090: * fixturesApplyAddAccountingLineBusinessRulesValidSubObjectCode() throws Exception { List sourceLines = new ArrayList(); List
1091: * targetLines = new ArrayList(); addFixture( KualiRuleTestCase.DOCUMENT_DESCRIPTION, "testing " +
1092: * "IndirectCostAdjustmentDocumentServiceTest.createValidRuleDIDocument" ); addFixture( KualiRuleTestCase.EXPLANATION, "This is
1093: * a test document, " + "testing valid accounting line business rules." ); sourceLines.add( fixtureSourceAccountingLine( "1696",
1094: * "2000" ) ); sourceLines.add( fixtureSourceAccountingLine( "1696", "1000" ) ); addFixture(
1095: * KualiRuleTestCase.SOURCE_ACCOUNTING_LINES, sourceLines ); targetLines.add( fixtureTargetAccountingLine( "1696", "2000" ) );
1096: * targetLines.add( fixtureTargetAccountingLine( "1696", "1000" ) ); addFixture( KualiRuleTestCase.TARGET_ACCOUNTING_LINES,
1097: * targetLines ); } public final void fixturesApplyRouteDocumentBusinessRulesNotInBalance() throws Exception { List sourceLines =
1098: * new ArrayList(); List targetLines = new ArrayList(); addFixture( KualiRuleTestCase.DOCUMENT_DESCRIPTION, "test" );
1099: * addFixture( KualiRuleTestCase.EXPLANATION, "This is a test document, " + "testing valid accounting line business rules." );
1100: * sourceLines.add( fixtureSourceAccountingLine( "9912", "2000" ) ); sourceLines.add( fixtureSourceAccountingLine( "1698",
1101: * "1000" ) ); addFixture( KualiRuleTestCase.SOURCE_ACCOUNTING_LINES, sourceLines ); targetLines.add(
1102: * fixtureTargetAccountingLine( "9912", "1000" ) ); targetLines.add( fixtureTargetAccountingLine( "1698", "2000" ) );
1103: * addFixture( KualiRuleTestCase.TARGET_ACCOUNTING_LINES, targetLines ); } public final void
1104: * fixturesApplyRouteDocumentBusinessRulesInvalidSubObjectCode() throws Exception {
1105: * fixturesApplyAddAccountingLineBusinessRulesInvalidSubObjectCode(); } public final void
1106: * fixturesApplyRouteDocumentBusinessRules_validDocument() throws Exception { List sourceLines = new ArrayList(); List
1107: * targetLines = new ArrayList(); addFixture( KualiRuleTestCase.DOCUMENT_DESCRIPTION, "test" ); addFixture(
1108: * KualiRuleTestCase.EXPLANATION, "This is a test document, " + "testing valid accounting line business rules." );
1109: * sourceLines.add( fixtureSourceAccountingLine( "5198", "2000" ) ); sourceLines.add( fixtureSourceAccountingLine( "1696",
1110: * "1000" ) ); addFixture( KualiRuleTestCase.SOURCE_ACCOUNTING_LINES, sourceLines ); targetLines.add(
1111: * fixtureTargetAccountingLine( "5198", "2000" ) ); targetLines.add( fixtureTargetAccountingLine( "1696", "1000" ) );
1112: * addFixture( KualiRuleTestCase.TARGET_ACCOUNTING_LINES, targetLines ); }
1113: */
1114: }
|