Esempio n. 1
0
  @Test
  public void rollbackPaymentOrderProcessing() {
    final String actionName = "Status2 -> Status1";
    controller.disbandDownstreamDocuments(actionName);

    verify(cache).disbandDownstreamDocuments(actionName);
    verify(dialog, never()).dispose();
  }
Esempio n. 2
0
  @Test(expected = RowNotSelectedException.class)
  public void aFundingSouldBeSelectedInOrderToRemoveItsElectronicDocuments() {
    final String CONFIRNATION_DIALOG_OUTCOME = "RollbackPaymentOrderProcessing";

    when(cache.getFunding()).thenReturn(null);

    controller.openDisbandDownstreamDocumentsDialog(CONFIRNATION_DIALOG_OUTCOME);
  }
Esempio n. 3
0
  @Test
  public void displayConfirmationDialogBeforeGeneratingSufdDocument() {

    controller.openCreateSufdDocumentConfirmationDialog(mock(ActionEvent.class));

    verify(dialog).displayConfirmationForm("CreateSufdDocument");
    verifyNoMoreInteractions(cache, dialog);
  }
Esempio n. 4
0
  @Test
  public void openProcessAccrualsConfirmationDialog() {
    final String OUTCOME = "ProcessAccrualsAndGeneratePayments";

    controller.openProcessAccrualsConfirmationDialog(OUTCOME);

    verify(dialog).displayInputForm(OUTCOME);
  }
Esempio n. 5
0
  @Test
  public void openGenerateAccrualGroupsDialog() {
    final String GENERATE_ACCRUAL_GROUPS_OUTCOME = "GenerateAccrualGroups";

    controller.openGenerateAccrualGroupsDialog(GENERATE_ACCRUAL_GROUPS_OUTCOME);

    verify(dialog).displayInputForm(GENERATE_ACCRUAL_GROUPS_OUTCOME);
  }
Esempio n. 6
0
  @Test(expected = RowNotSelectedException.class)
  public void throwRowNotSelectedExceptionWhenAFundingIsNotSelected() {
    final String GENERATE_PAYMENT_ORDERS_DIALOG_OUTCOME = "GeneratePaymentOrders";

    when(cache.getFunding()).thenReturn(null);

    controller.openProcessPaymentsConfirmationDialog(GENERATE_PAYMENT_ORDERS_DIALOG_OUTCOME);
  }
Esempio n. 7
0
  @Test
  public void openDisbandAccrualGroupsDialog() {
    final String DISBAND_ACCRUAL_GROUPS_OUTCOME = "DisbandAccrualGroups";

    controller.openDisbandAccrualGroupsDialog(DISBAND_ACCRUAL_GROUPS_OUTCOME);

    verify(dialog).displayInputForm(DISBAND_ACCRUAL_GROUPS_OUTCOME);
  }
Esempio n. 8
0
  @Test
  public void openKosguReferenceParameterGatherer() {
    final String PARAM_GATHERER_OUTCOME = "KosguReferenceParameterGatherer";

    controller.openKosguReferenceParameterGathererDialog(PARAM_GATHERER_OUTCOME);

    verify(dialog).displayInputForm(PARAM_GATHERER_OUTCOME);
  }
Esempio n. 9
0
  @Test
  public void displayPaymentOrderRosterReportParameterGatherer() {
    final String outcome = "PaymentOrderRosterReportParameterGatherer";

    controller.openPaymentOrderRosterReportParameterGathererDialog();

    verify(dialog).displayInputForm(outcome);
  }
Esempio n. 10
0
  @Test(expected = RowNotSelectedException.class)
  public void verifyIfAnyFundingIsSelectedBeforePaymentOrderRemoval() {
    final String CONFIRMATION_DIALOG_OUTCOME = "RollbackPaymentProcessing";

    when(cache.getFunding()).thenReturn(null);

    controller.openUndoPaymentsProcessingConfirmationDialog(CONFIRMATION_DIALOG_OUTCOME);
  }
Esempio n. 11
0
  @Test(expected = RowNotSelectedException.class)
  public void verifyAFundingIsSelectedBeforeGeneratingElectronicDocuments() {
    final String GENERATE_ELECTRONIC_DOCUMENT_DIALOG_OUTCOME = "GenerateElectronicDocument";

    when(cache.getFunding()).thenReturn(null);

    controller.openProcessPaymentOrdersConfirmationDialog(
        GENERATE_ELECTRONIC_DOCUMENT_DIALOG_OUTCOME);
  }
Esempio n. 12
0
  @Test
  public void scheduleAnEditOperationAndDisplayEditDialog() {

    controller.openEditSelectedFundingDialog(EDIT_OUTCOME);

    InOrder inOrder = inOrder(cache, dialog);

    inOrder.verify(cache).scheduleEditOperation();
    inOrder.verify(dialog).displayInputForm(EDIT_OUTCOME);
  }
Esempio n. 13
0
  @Test
  public void scheduleARemoveOperationAndDisplayConfirmationDialog() {

    controller.openRemoveSelectedFundingConfirmationDialog(REMOVE_OUTCOME);

    InOrder inOrder = inOrder(cache, dialog);

    inOrder.verify(cache).scheduleRemoveOperation();
    inOrder.verify(dialog).displayBeforeRemoveConfirmationDialog(REMOVE_OUTCOME);
  }
Esempio n. 14
0
  @Test
  public void openProcessPaymentsConfirmationDialog() {
    final String GENERATE_PAYMENT_ORDERS_DIALOG_OUTCOME = "GeneratePaymentOrders";

    when(cache.getFunding()).thenReturn(mock(Funding.class));

    controller.openProcessPaymentsConfirmationDialog(GENERATE_PAYMENT_ORDERS_DIALOG_OUTCOME);

    verify(dialog).displayProgressPopup(GENERATE_PAYMENT_ORDERS_DIALOG_OUTCOME);
  }
Esempio n. 15
0
  @Test
  public void openUndoPaymentsProcessingConfirmationDialog() {
    final String CONFIRMATION_DIALOG_OUTCOME = "RollbackPaymentProcessing";

    when(cache.getFunding()).thenReturn(mock(Funding.class));

    controller.openUndoPaymentsProcessingConfirmationDialog(CONFIRMATION_DIALOG_OUTCOME);

    verify(dialog).displayBeforeRemoveConfirmationDialog(CONFIRMATION_DIALOG_OUTCOME);
  }
Esempio n. 16
0
  @Test
  public void creteANewFundingAndScheduleACreateOperationAndDisplayEditDialog() {

    controller.openCreateNewFundingDialog(EDIT_OUTCOME);

    InOrder inOrder = inOrder(cache, dialog);

    inOrder.verify(cache).createNewFunding();
    inOrder.verify(cache).scheduleCreateOperation();
    inOrder.verify(dialog).displayInputForm(EDIT_OUTCOME);
  }
Esempio n. 17
0
  @Test
  public void openProcessPaymentOrdersConfirmationDialog() {
    final String GENERATE_ELECTRONIC_DOCUMENT_DIALOG_OUTCOME = "GenerateElectronicDocument";

    when(cache.getFunding()).thenReturn(mock(Funding.class));

    controller.openProcessPaymentOrdersConfirmationDialog(
        GENERATE_ELECTRONIC_DOCUMENT_DIALOG_OUTCOME);

    verify(dialog).displayProgressPopup(GENERATE_ELECTRONIC_DOCUMENT_DIALOG_OUTCOME);
  }