Search in sources :

Example 1 with TransactionHistoryPage

use of org.mifos.test.acceptance.framework.savings.TransactionHistoryPage in project head by mifos.

the class SavingsDepositTest method makeDepositToClientSavingsAccount.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void makeDepositToClientSavingsAccount() throws Exception {
    initData();
    DepositWithdrawalSavingsParameters params = new DepositWithdrawalSavingsParameters();
    params.setTrxnDateMM("09");
    params.setTrxnDateDD("09");
    params.setTrxnDateYYYY("2009");
    params.setAmount("543.2");
    params.setPaymentType(DepositWithdrawalSavingsParameters.CASH);
    params.setTrxnType(DepositWithdrawalSavingsParameters.DEPOSIT);
    params.setReceiptDateDD("09");
    params.setReceiptDateMM("09");
    params.setReceiptDateYYYY("2009");
    SavingsAccountDetailPage accountDetailPage = savingsAccountHelper.makeDepositOrWithdrawalOnSavingsAccount("000100000000036", params);
    String[] tablesToRetrieve = { "SAVINGS_ACTIVITY_DETAILS", "SAVINGS_ACCOUNT", "SAVINGS_PERFORMANCE", "SAVINGS_TRXN_DETAIL" };
    String[] tablesToValidate = { "SAVINGS_ACTIVITY_DETAILS", "SAVINGS_ACCOUNT", "SAVINGS_PERFORMANCE" };
    IDataSet expectedDataSet = dbUnitUtilities.getDataSetFromDataSetDirectoryFile("SavingsDeposit_001_result_dbunit.xml");
    IDataSet databaseDataSet = dbUnitUtilities.getDataSetForTables(dataSource, tablesToRetrieve);
    dbUnitUtilities.verifyTables(tablesToValidate, databaseDataSet, expectedDataSet);
    // verify savings transaction table with sorting
    String[] orderSavingsTrxnByColumns = new String[] { "deposit_amount" };
    dbUnitUtilities.verifyTableWithSort(orderSavingsTrxnByColumns, SavingsDepositTest.SAVINGS_TRXN_DETAIL, expectedDataSet, databaseDataSet);
    // verify transaction history table
    TransactionHistoryPage historyPage = accountDetailPage.navigateToTransactionHistoryPage();
    historyPage.verifyTableTypeAfterDeposit(2);
}
Also used : TransactionHistoryPage(org.mifos.test.acceptance.framework.savings.TransactionHistoryPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) IDataSet(org.dbunit.dataset.IDataSet) DepositWithdrawalSavingsParameters(org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)

Aggregations

IDataSet (org.dbunit.dataset.IDataSet)1 DepositWithdrawalSavingsParameters (org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)1 SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)1 TransactionHistoryPage (org.mifos.test.acceptance.framework.savings.TransactionHistoryPage)1