/** * Validates that validateKemId returns false when the kemid on the transaction line does not * exist in the db. */ public void testValidateKemId_False() { EndowmentTransactionLine endowmentTransactionLine = EndowmentTransactionLineFixture.ENDOWMENT_TRANSACTIONAL_LINE_INCOME .createEndowmentTransactionLine(false); endowmentTransactionLine.setKemid(EndowTestConstants.INVALID_KEMID); assertFalse( rule.validateKemId( endowmentTransactionLine, rule.getErrorPrefix(endowmentTransactionLine, -1))); }
/** * Validates that validateKemId returns true when the kemid on the transaction line exists in the * db. */ public void testValidateKemId_True() { KEMID kemid = KemIdFixture.OPEN_KEMID_RECORD.createKemidRecord(); EndowmentTransactionLine endowmentTransactionLine = EndowmentTransactionLineFixture.ENDOWMENT_TRANSACTIONAL_LINE_INCOME .createEndowmentTransactionLine(false); assertTrue( rule.validateKemId( endowmentTransactionLine, rule.getErrorPrefix(endowmentTransactionLine, -1))); }