Michael Hoennig
2022-10-25 d7eed084202ed16b1c8a2514dae0ca94018a1c74
always run tests with locale en_US, no matter of system settings
1 files added
1 files modified
21 ■■■■■ changed files
build.gradle 4 ●●● patch | view | raw | blame | history
src/test/java/net/hostsharing/test/LocaleUnitTest.java 17 ●●●●● patch | view | raw | blame | history
build.gradle
@@ -98,9 +98,11 @@
    ]
}
// Use JUnit Jupiter
// Configure tests
tasks.named('test') {
    useJUnitPlatform()
    jvmArgs '-Duser.language=en'
    jvmArgs '-Duser.country=US'
}
// OpenAPI Source Code Generation
src/test/java/net/hostsharing/test/LocaleUnitTest.java
New file
@@ -0,0 +1,17 @@
package net.hostsharing.test;
import org.junit.jupiter.api.Test;
import java.math.BigDecimal;
import java.util.Locale;
import static org.assertj.core.api.Assertions.assertThat;
public class LocaleUnitTest {
    @Test
    void testsAreUsingEnUsUtf8Locale() {
        assertThat(Locale.getDefault()).isEqualTo(new Locale("en", "US"));
        assertThat(new BigDecimal("64.00").toString()).isEqualTo("64.00");
    }
}