Skip to content

Commit

Permalink
core: Fix broken CoinUtilTest.testGetAdjustedAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
alvasw committed May 10, 2023
1 parent dbcb2e7 commit 2ae6fab
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions core/src/test/java/bisq/core/util/coin/CoinUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public void testGetAdjustedAmount() {
20_000_000,
1);
assertEquals(
"Minimum trade amount allowed should be adjusted to the smallest trade allowed.",
"0.001 BTC",
result.toFriendlyString()
result.toFriendlyString(),
"Minimum trade amount allowed should be adjusted to the smallest trade allowed."
);

try {
Expand All @@ -76,9 +76,9 @@ public void testGetAdjustedAmount() {
fail("Expected IllegalArgumentException to be thrown when amount is too low.");
} catch (IllegalArgumentException iae) {
assertEquals(
"Unexpected exception message.",
"amount needs to be above minimum of 10k satoshis",
iae.getMessage()
iae.getMessage(),
"Unexpected exception message."
);
}

Expand All @@ -88,9 +88,9 @@ public void testGetAdjustedAmount() {
20_000_000,
1);
assertEquals(
"Minimum allowed trade amount should not be adjusted.",
result.toFriendlyString(),
"0.01 BTC",
result.toFriendlyString()
"Minimum allowed trade amount should not be adjusted."
);

result = CoinUtil.getAdjustedAmount(
Expand All @@ -99,9 +99,9 @@ public void testGetAdjustedAmount() {
1_000_000,
1);
assertEquals(
"Minimum trade amount allowed should respect maxTradeLimit and factor, if possible.",
result.toFriendlyString(),
"0.001 BTC",
result.toFriendlyString()
"Minimum trade amount allowed should respect maxTradeLimit and factor, if possible."
);

// TODO(chirhonul): The following seems like it should raise an exception or otherwise fail.
Expand All @@ -115,9 +115,9 @@ public void testGetAdjustedAmount() {
5_000,
1);
assertEquals(
"Minimum trade amount allowed with low maxTradeLimit should still respect that limit, even if result does not respect the factor specified.",
"0.00005 BTC",
result.toFriendlyString()
result.toFriendlyString(),
"Minimum trade amount allowed with low maxTradeLimit should still respect that limit, even if result does not respect the factor specified."
);
}
}

0 comments on commit 2ae6fab

Please sign in to comment.