Fix failing tests (bug with equals instead of compareTo)

This commit is contained in:
AppleDash 2020-06-03 08:06:50 -04:00
parent 77ba58e333
commit bb02d78b88
2 changed files with 7 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class Currency {
*/
public String formatAmount(BigDecimal amount) {
return ChatColor.translateAlternateColorCodes('&',
MessageUtils.indexedFormat(this.balanceFormat, this.format.format(amount), amount.equals(BigDecimal.ONE) ? this.nameSingular : this.namePlural)
MessageUtils.indexedFormat(this.balanceFormat, this.format.format(amount), amount.compareTo(BigDecimal.ONE) == 0 ? this.nameSingular : this.namePlural)
);
}

View File

@ -6,6 +6,7 @@ import org.appledash.saneeconomy.economy.logger.TransactionLogger;
import org.appledash.saneeconomy.vault.VaultHook;
import java.util.Optional;
import java.util.UUID;
/**
* Created by appledash on 9/18/16.
@ -26,4 +27,9 @@ public class MockSaneEconomy implements ISaneEconomy {
public VaultHook getVaultHook() {
return null;
}
@Override
public String getLastName(UUID uuid) {
return uuid.toString();
}
}