FINERACT-2326: Deregister static mocks
This commit is contained in:
committed by
Arnold Gálovics
parent
8f3ad9c092
commit
2a29b1ca0e
+6
@@ -35,6 +35,7 @@ import org.apache.fineract.organisation.monetary.domain.MoneyHelper;
|
|||||||
import org.apache.fineract.portfolio.loanproduct.domain.InterestCalculationPeriodMethod;
|
import org.apache.fineract.portfolio.loanproduct.domain.InterestCalculationPeriodMethod;
|
||||||
import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod;
|
import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod;
|
||||||
import org.apache.fineract.portfolio.loanproduct.domain.LoanProductMinimumRepaymentScheduleRelatedDetail;
|
import org.apache.fineract.portfolio.loanproduct.domain.LoanProductMinimumRepaymentScheduleRelatedDetail;
|
||||||
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mockito.MockedStatic;
|
import org.mockito.MockedStatic;
|
||||||
@@ -55,6 +56,11 @@ class InterestPeriodTest {
|
|||||||
moneyHelper.when(MoneyHelper::getMathContext).thenReturn(MC);
|
moneyHelper.when(MoneyHelper::getMathContext).thenReturn(MC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
static void tearDown() {
|
||||||
|
moneyHelper.close();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testGettersNeverReturnNull() {
|
void testGettersNeverReturnNull() {
|
||||||
// Create an empty InterestPeriod with all null Money fields
|
// Create an empty InterestPeriod with all null Money fields
|
||||||
|
|||||||
+6
@@ -34,6 +34,7 @@ import org.apache.fineract.organisation.monetary.domain.MoneyHelper;
|
|||||||
import org.apache.fineract.portfolio.loanproduct.domain.InterestCalculationPeriodMethod;
|
import org.apache.fineract.portfolio.loanproduct.domain.InterestCalculationPeriodMethod;
|
||||||
import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod;
|
import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod;
|
||||||
import org.apache.fineract.portfolio.loanproduct.domain.LoanProductMinimumRepaymentScheduleRelatedDetail;
|
import org.apache.fineract.portfolio.loanproduct.domain.LoanProductMinimumRepaymentScheduleRelatedDetail;
|
||||||
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mockito.MockedStatic;
|
import org.mockito.MockedStatic;
|
||||||
@@ -61,6 +62,11 @@ class RepaymentPeriodTest {
|
|||||||
when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(true);
|
when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
static void tearDown() {
|
||||||
|
moneyHelper.close();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testGettersNeverReturnNull() {
|
void testGettersNeverReturnNull() {
|
||||||
// Create a minimal RepaymentPeriod
|
// Create a minimal RepaymentPeriod
|
||||||
|
|||||||
Reference in New Issue
Block a user