/** * Validates that canKEMIDHaveAPrincipalTransaction returns false when the transaction line IP * indicator is P and the principal restriction code is NA. */ public void testKemidPrincRestrNotNAWhenTransLinePrincipal_False() { EndowmentTransactionLine endowmentTransactionLine = EndowmentTransactionLineFixture.ENDOWMENT_TRANSACTIONAL_LINE_PRINCIPAL .createEndowmentTransactionLine(false); KEMID kemid = KemIdFixture.NA_PRINC_RESTR_KEMID_RECORD.createKemidRecord(); endowmentTransactionLine.setKemid(kemid.getKemid()); endowmentTransactionLine.setKemidObj(kemid); assertFalse( rule.canKEMIDHaveAPrincipalTransaction( endowmentTransactionLine, rule.getErrorPrefix(endowmentTransactionLine, -1))); }
/** * Validates that validateNoTransactionRestriction returns true when the KEMID has a transaction * restriction code different from NTRAN. */ public void testTransactionsNotAllowedForNTRANKemid_True() { KEMID ntranKemid = KemIdFixture.ALLOW_TRAN_KEMID_RECORD.createKemidRecord(); EndowmentTargetTransactionLine endowmentTargetTransactionLine = new EndowmentTargetTransactionLine(); endowmentTargetTransactionLine.setKemid(ntranKemid.getKemid()); endowmentTargetTransactionLine.setKemidObj(ntranKemid); assertTrue( rule.validateNoTransactionRestriction( endowmentTargetTransactionLine, rule.getErrorPrefix(endowmentTargetTransactionLine, -1))); }
/** * Validates that validateChartMatch returns false when etran code gl chart does not match the * chart for KEMID general ledger account. */ public void testKemidEtranCodeMatch_False() { EndowmentTransactionLine endowmentTargetTransactionLine = EndowmentTransactionLineFixture.ENDOWMENT_TRANSACTIONAL_LINE_INCOME .createEndowmentTransactionLine(false); EndowmentTransactionCode endowmentTransactionCode = EndowmentTransactionCodeFixture.INCOME_TRANSACTION_CODE.createEndowmentTransactionCode(); KEMID kemid = KemIdFixture.OPEN_KEMID_RECORD.createKemidRecord(); GLLink glLink = GLLinkFixture.GL_LINK_UA_CHART.createGLLink(); KemidGeneralLedgerAccount generalLedgerAccount = KemidGeneralLedgerAccountFixture.KEMID_GL_ACCOUNT.createKemidGeneralLedgerAccount(); kemid.getKemidGeneralLedgerAccounts().add(generalLedgerAccount); endowmentTransactionCode.getGlLinks().add(glLink); endowmentTargetTransactionLine.setKemid(kemid.getKemid()); endowmentTargetTransactionLine.setKemidObj(kemid); endowmentTargetTransactionLine.setEtranCode(endowmentTransactionCode.getCode()); endowmentTargetTransactionLine.setEtranCodeObj(endowmentTransactionCode); assertFalse( rule.validateChartMatch( endowmentTargetTransactionLine, rule.getErrorPrefix(endowmentTargetTransactionLine, -1))); }
public void testClose() { assertEquals(kemid.isClose(), savedKemid.isClose()); }
public void testDormantIndicator() { assertEquals(kemid.isDormantIndicator(), savedKemid.isDormantIndicator()); }
public void testCashSweepModelId() { assertEquals(kemid.getCashSweepModelId(), savedKemid.getCashSweepModelId()); }
public void testTransactionRestrictionCode() { assertEquals(kemid.getTransactionRestrictionCode(), savedKemid.getTransactionRestrictionCode()); }
public void testResponsibleAdminCode() { assertEquals(kemid.getResponsibleAdminCode(), savedKemid.getResponsibleAdminCode()); }
public void testDateEstablished() { assertEquals(kemid.getDateEstablished(), savedKemid.getDateEstablished()); }
public void testLongTitle() { assertEquals(kemid.getLongTitle(), savedKemid.getLongTitle()); }
public void testShortTitle() { assertEquals(kemid.getShortTitle(), savedKemid.getShortTitle()); }
public void testKIMEID() { assertEquals(kemid.getKemid(), savedKemid.getKemid()); }
/** @see junit.framework.TestCase#setUp() */ @Override protected void setUp() throws Exception { super.setUp(); kemid = KemIdFixture.SAVE_KEMID_RECORD.createKemidRecord(); savedKemid = KemIdFixture.SAVE_KEMID_RECORD.getSavedKEMID(kemid.getKemid()); }
public void testPrincipalRestrictionCode() { assertEquals(kemid.getPrincipalRestrictionCode(), savedKemid.getPrincipalRestrictionCode()); }
public void testIncomeRestrictionCode() { assertEquals(kemid.getIncomeRestrictionCode(), savedKemid.getIncomeRestrictionCode()); }
public void testClosedToKEMID() { assertEquals(kemid.getClosedToKEMID(), savedKemid.getClosedToKEMID()); }
public void testCloseCode() { assertEquals(kemid.getCloseCode(), savedKemid.getCloseCode()); }
public void testDateOpened() { assertEquals(kemid.getDateOpened(), savedKemid.getDateOpened()); }