Exemplo n.º 1
0
  @SuppressWarnings({"PMD.SignatureDeclareThrowsException", "PMD.SystemPrintln"})
  @Test(enabled = true)
  public void importMpesaTransactions() throws Exception {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    ViewOrganizationSettingsPage viewOrganizationSettingsPage =
        adminPage.navigateToViewOrganizationSettingsPage();
    viewOrganizationSettingsPage.verifyMiscellaneous(
        new String[] {"Max MPESA Disbursal Limit: 50000.0"});

    propertiesHelper.setImportTransactionOrder("AL3,AL5");

    String dataset = "mpesa_export_dbunit.xml";
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, dataset, dataSource, selenium);

    for (String importFile : TEST_FILES) {
      String path = this.getClass().getResource("/mpesa/" + importFile).toString();
      importTransaction(path);
      checkIfOutputMatchesExpected(path);
    }
  }