Example #1
0
 public final void testThreshold_ChartOfAccount_Invalid() {
   MaintenanceDocumentBase doc = getMaintenanceDocument(ThresholdFixture.CHARTCODE_INVALID);
   assertTrue(thresholdRule.processSaveDocument(doc));
   assertTrue(thresholdRule.processRouteDocument(doc));
   assertTrue(GlobalVariables.getMessageMap().hasErrors());
   assertEquals(1, GlobalVariables.getMessageMap().getErrorCount());
   assertTrue(
       GlobalVariables.getMessageMap()
           .getErrorMessages()
           .containsKey("document.newMaintainableObject.chartOfAccountsCode"));
 }
Example #2
0
 public final void testThreshold_ChartOfAccountAndAccountTypeAndSubAccountType() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_ACCOUNTTYPE_AND_SUBACCOUNTTYPE);
   assertTrue(thresholdRule.processSaveDocument(doc));
   assertFalse(thresholdRule.processRouteDocument(doc));
   assertTrue(GlobalVariables.getMessageMap().hasErrors());
   assertEquals(2, GlobalVariables.getMessageMap().getErrorCount());
   assertTrue(
       GlobalVariables.getMessageMap()
           .getErrorMessages()
           .containsKey("document.newMaintainableObject.accountTypeCode"));
   assertTrue(
       GlobalVariables.getMessageMap()
           .getErrorMessages()
           .containsKey("document.newMaintainableObject.subFundGroupCode"));
 }
Example #3
0
 public final void testThreshold_InvalidDescription() {
   MaintenanceDocumentBase doc = getMaintenanceDocument(ThresholdFixture.CHARTCODE);
   doc.getDocumentHeader().setDocumentDescription(null);
   assertFalse(thresholdRule.processSaveDocument(doc));
   assertTrue(GlobalVariables.getMessageMap().hasErrors());
   assertTrue(
       GlobalVariables.getMessageMap()
           .getErrorMessages()
           .containsKey("document.documentHeader.documentDescription"));
 }
Example #4
0
 public final void testThreshold_ChartOfAccountAndSubAccountType() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_SUBACCOUNTTYPE);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }
Example #5
0
 public final void testThreshold_ChartOfAccount() {
   MaintenanceDocumentBase doc = getMaintenanceDocument(ThresholdFixture.CHARTCODE);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }
Example #6
0
 public final void testThreshold_ChartOfAccountAndVendorNumber() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_VENDORNUMBER);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }
Example #7
0
 public final void testThreshold_ChartOfAccountAndCommodityCode() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_COMMODITYCODE);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }