always run tests with locale en_US, no matter of system settings
This commit is contained in:
parent
e5ec867819
commit
d7eed08420
@ -98,9 +98,11 @@ tasks.withType(JavaCompile) {
|
||||
]
|
||||
}
|
||||
|
||||
// Use JUnit Jupiter
|
||||
// Configure tests
|
||||
tasks.named('test') {
|
||||
useJUnitPlatform()
|
||||
jvmArgs '-Duser.language=en'
|
||||
jvmArgs '-Duser.country=US'
|
||||
}
|
||||
|
||||
// OpenAPI Source Code Generation
|
||||
|
17
src/test/java/net/hostsharing/test/LocaleUnitTest.java
Normal file
17
src/test/java/net/hostsharing/test/LocaleUnitTest.java
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user