Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
import java.util.Locale;

import static org.junit.jupiter.api.Assertions.*;

Expand Down Expand Up @@ -236,10 +237,22 @@ void testGetCurrencyForLocale() {
@Test
@DisplayName("Should get current currency")
void testGetCurrentCurrency() {
String currency = Money.getCurrentCurrency();

assertNotNull(currency);
assertFalse(currency.isEmpty());
// Save the current default locale
Locale originalLocale = java.util.Locale.getDefault();

try {
// Set a locale with a valid country code for testing
java.util.Locale.setDefault(java.util.Locale.US);

Comment on lines +241 to +246
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locale is already imported, but the test still uses fully-qualified java.util.Locale calls. Use Locale.getDefault() / Locale.setDefault(Locale.US) consistently here to reduce noise and keep the style aligned with the rest of the codebase.

Copilot uses AI. Check for mistakes.
String currency = Money.getCurrentCurrency();

assertNotNull(currency);
assertFalse(currency.isEmpty());
assertEquals("USD", currency);
} finally {
// Restore the original locale
java.util.Locale.setDefault(originalLocale);
}
}

@Test
Expand Down
Loading