Пример #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"));
 }
Пример #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"));
 }
Пример #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"));
 }
Пример #4
0
 public final void testThreshold_ChartOfAccountAndSubAccountType() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_SUBACCOUNTTYPE);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }
Пример #5
0
 public final void testThreshold_ChartOfAccount() {
   MaintenanceDocumentBase doc = getMaintenanceDocument(ThresholdFixture.CHARTCODE);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }
Пример #6
0
 public final void testThreshold_ChartOfAccountAndVendorNumber() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_VENDORNUMBER);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }
Пример #7
0
 public final void testThreshold_ChartOfAccountAndCommodityCode() {
   MaintenanceDocumentBase doc =
       getMaintenanceDocument(ThresholdFixture.CHARTCODE_AND_COMMODITYCODE);
   assertTrue(thresholdRule.processSaveDocument(doc));
 }