Skip to content

Commit

Permalink
Improved cashBalance, available and unavailable calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Jun 25, 2024
1 parent 924c50f commit 99d2775
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/test/java/org/folio/utils/CalculationUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ void overExpendedShouldBeGreaterThenZeroWhenSumOfExpendedAwaitingPaymentGreaterT

@ParameterizedTest
@CsvSource({
"1800, 200, 1500, 100, 700, 200, 300",
"1800, 200, 1500, 100, 500, 200, 200",
"1800, 200, 1500, 100, 700, 200, 200",
"1800, 200, 1500, 100, 500, 200, 100",
"1800, 200, 1500, 0, 400, 100, 0",
"1800, 200, 1500, 200, 700, 200, 400",
"1800, 200, 1500, 200, 700, 200, 200",
"1800, 200, 1000, 0, 100, 200, 0",
"1800, 200, 1000, 0, 1000, 200, 200",
"0, 2500, 0, 0, 250, 2500, 250",
"4000, 100, 4100, 0, 409, 1, 1",
"4000, 100, 4200, 0.5, 409, 1, 1.5",
"4000, 100, 4200, 0.5, 409, 1, 1.0",
"80, 20, 100, 0, 0, 1, 1",
"80, 20, 100, 0, 1, 0, 0",
"100, 0, 70, 5, 20, 30, 20",
"100, 0, 0, 10, 110, 10, 20",
"100, 0, 70, 5, 20, 30, 15",
"100, 0, 0, 10, 110, 10, 10",
"100, 0, 0, 0, -13, 1, 0",
"100, 0, 0, 0, -13, 15, 0",
"100, 0, 0, 0, -13, 110, 0",
"100, 0, 0, 0, -13, 0, 0",
"100, 0, 0, 0, -13, 20, 0",
"100, 0, -90, 1, 107, 90, 7",
"100, 0, -90, 1, 107, 90, 6",
"100, 0, -90, 0, 192, 5, 5",
"100, 0, -90, 0, 17, 5, 0",
"10000, 0, 1500, 500, 1500, 10000, 3000",
"10000, 0, 1500, 500, 1500, 10000, 2500",
"0, 1500, 0, 0, 150, 1500, 150"
})
void overEncumberedShouldBeGreaterThenZeroWhenEncumberedGreaterThatTotalFunding(double allocated, double netTransfer,
Expand Down Expand Up @@ -80,7 +80,7 @@ void overEncumberedShouldBeGreaterThenZeroWhenEncumberedAndOverExpendedGreaterTh

CalculationUtils.calculateBudgetSummaryFields(budget);

assertEquals(300d, budget.getOverEncumbrance(), 0d);
assertEquals(200d, budget.getOverEncumbrance(), 0d);
}

@Test
Expand Down

0 comments on commit 99d2775

Please sign in to comment.