From fb5398e83b40bdf69207be88008fe93fd8ac148e Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Mon, 16 Jun 2014 18:18:15 -0700 Subject: [PATCH] more fixes to account transfer test cases --- .../integrationtests/AccountTransferTest.java | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/AccountTransferTest.java b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/AccountTransferTest.java index 10276d03a..f50fb8af4 100644 --- a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/AccountTransferTest.java +++ b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/AccountTransferTest.java @@ -145,9 +145,6 @@ public class AccountTransferTest { String.valueOf(fromOfficeId)); Assert.assertNotNull(fromClientID); - Account fromTransferAccount = accountHelper.createLiabilityAccount(); - Assert.assertNotNull(fromTransferAccount); - final Integer fromSavingsProductID = createSavingsProduct(this.requestSpec, this.responseSpec, MINIMUM_OPENING_BALANCE, assetAccount, incomeAccount, expenseAccount, liabilityAccount); Assert.assertNotNull(fromSavingsProductID); @@ -188,9 +185,9 @@ public class AccountTransferTest { final JournalEntry[] office2LiabilityEntries = { new JournalEntry(new Float(ACCOUNT_TRANSFER_AMOUNT), JournalEntry.TransactionType.DEBIT) }; - this.journalEntryHelper.checkJournalEntryForAssetAccount(fromTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, + this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, office1LiabilityEntries); - this.journalEntryHelper.checkJournalEntryForAssetAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, + this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, office2LiabilityEntries); } @@ -246,9 +243,6 @@ public class AccountTransferTest { String.valueOf(fromOfficeId)); Assert.assertNotNull(fromClientID); - Account fromTransferAccount = accountHelper.createLiabilityAccount(); - Assert.assertNotNull(fromTransferAccount); - final Integer fromSavingsProductID = createSavingsProduct(this.requestSpec, this.responseSpec, MINIMUM_OPENING_BALANCE, assetAccount, incomeAccount, expenseAccount, liabilityAccount); Assert.assertNotNull(fromSavingsProductID); @@ -288,9 +282,9 @@ public class AccountTransferTest { final JournalEntry[] office2LiabilityEntries = { new JournalEntry(new Float(ACCOUNT_TRANSFER_AMOUNT_ADJUST), JournalEntry.TransactionType.DEBIT) }; - this.journalEntryHelper.checkJournalEntryForAssetAccount(fromTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, + this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, office1LiabilityEntries); - this.journalEntryHelper.checkJournalEntryForAssetAccount(toTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, + this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, office2LiabilityEntries); } @@ -344,9 +338,6 @@ public class AccountTransferTest { String.valueOf(fromOfficeId)); Assert.assertNotNull(fromClientID); - Account fromTransferAccount = accountHelper.createLiabilityAccount(); - Assert.assertNotNull(fromTransferAccount); - final Integer loanProductID = createLoanProduct(loanAssetAccount, loanIncomeAccount, loanExpenseAccount, overpaymentAccount); Assert.assertNotNull(loanProductID); @@ -412,9 +403,9 @@ public class AccountTransferTest { final JournalEntry[] office2LiabilityEntries = { new JournalEntry(new Float(ACCOUNT_TRANSFER_AMOUNT_ADJUST), JournalEntry.TransactionType.DEBIT) }; - this.journalEntryHelper.checkJournalEntryForAssetAccount(fromTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, + this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, office1LiabilityEntries); - this.journalEntryHelper.checkJournalEntryForAssetAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, + this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityTransferAccount, AccountTransferHelper.ACCOUNT_TRANSFER_DATE, office2LiabilityEntries); }