Search in sources :

Example 1 with GLCategoryType

use of org.mifos.accounts.financial.business.GLCategoryType in project head by mifos.

the class DepositAccountingEntryTest method testBuildAccountEntryDepositIntoVoluntarySavings.

@Test
public void testBuildAccountEntryDepositIntoVoluntarySavings() throws FinancialException {
    SavingsType savingsType = SavingsType.VOLUNTARY;
    GLCategoryType bankCategoryType = GLCategoryType.ASSET;
    GLCategoryType savingsCategoryType = GLCategoryType.LIABILITY;
    FinancialActionConstants financialActionConstant = FinancialActionConstants.VOLUNTARYDEPOSIT;
    setupVoluntaryForOneTest(savingsType, bankCategoryType, savingsCategoryType, financialActionConstant);
    doBuild(new DepositAccountingEntry(), mockedFinancialBusinessService, mockedFinancialActivity);
    // verify the two transactions created
    verifyCreatedTransactions(depositAmount, mockedFinancialActivity, mockedIncomingTransaction, mockedFinancialAction, mockedBankGLCode, mockedSavingsDepositGLCode, bankCategoryType, FinancialConstants.DEBIT, savingsCategoryType, FinancialConstants.CREDIT);
}
Also used : FinancialActionConstants(org.mifos.accounts.financial.util.helpers.FinancialActionConstants) GLCategoryType(org.mifos.accounts.financial.business.GLCategoryType) SavingsType(org.mifos.accounts.productdefinition.util.helpers.SavingsType) Test(org.junit.Test)

Example 2 with GLCategoryType

use of org.mifos.accounts.financial.business.GLCategoryType in project head by mifos.

the class DepositAccountingEntryTest method testBuildAccountEntryDepositIntoMandatorySavings.

@Test
public void testBuildAccountEntryDepositIntoMandatorySavings() throws FinancialException {
    SavingsType savingsType = SavingsType.MANDATORY;
    GLCategoryType bankCategoryType = GLCategoryType.ASSET;
    GLCategoryType savingsCategoryType = GLCategoryType.LIABILITY;
    FinancialActionConstants financialActionConstant = FinancialActionConstants.MANDATORYDEPOSIT;
    setupMandatoryForOneTest(savingsType, bankCategoryType, savingsCategoryType, financialActionConstant);
    doBuild(new DepositAccountingEntry(), mockedFinancialBusinessService, mockedFinancialActivity);
    verifyCreatedTransactions(depositAmount, mockedFinancialActivity, mockedIncomingTransaction, mockedFinancialAction, mockedBankGLCode, mockedSavingsDepositGLCode, bankCategoryType, FinancialConstants.DEBIT, savingsCategoryType, FinancialConstants.CREDIT);
}
Also used : FinancialActionConstants(org.mifos.accounts.financial.util.helpers.FinancialActionConstants) GLCategoryType(org.mifos.accounts.financial.business.GLCategoryType) SavingsType(org.mifos.accounts.productdefinition.util.helpers.SavingsType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 GLCategoryType (org.mifos.accounts.financial.business.GLCategoryType)2 FinancialActionConstants (org.mifos.accounts.financial.util.helpers.FinancialActionConstants)2 SavingsType (org.mifos.accounts.productdefinition.util.helpers.SavingsType)2