Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests are locale dependent #232

Open
rimuln opened this issue Mar 25, 2021 · 0 comments
Open

Tests are locale dependent #232

rimuln opened this issue Mar 25, 2021 · 0 comments

Comments

@rimuln
Copy link

rimuln commented Mar 25, 2021

Algouth classes set in BeforeAll method Locale.setDefault(Locale.ENGLISH) 2 tests are failing due actual values in differet language.

Tested on our company machnine with German system locale and my developer machine with Czech locale.

Test output is:

com.monitorjbl.xlsx.StreamingReaderTest.testSpecialStyles()  Time elapsed: 0.023 sec  <<< FAILURE!
java.lang.AssertionError:
Expected: "Thu\", \"Dec 25\", \"14"
     but: was "Ŕt\", \"pro 25\", \"14"
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
        at com.monitorjbl.xlsx.StreamingReaderTest.testSpecialStyles(StreamingReaderTest.java:486)

and:

Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.176 sec <<< FAILURE!
com.monitorjbl.xlsx.StreamingWorkbookTest.testNumericFormattedFormulaCell()  Time elapsed: 0.022 sec  <<< FAILURE!
org.opentest4j.AssertionFailedError: Cell Sheet1!C2 has wrong string content. ==> expected: <May 11 2018> but was: <kvýtna 11 2018>
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
        at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
        at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
        at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1135)
        at com.monitorjbl.xlsx.TestUtils.expectStringContent(TestUtils.java:30)
        at com.monitorjbl.xlsx.StreamingWorkbookTest.testNumericFormattedFormulaCell(StreamingWorkbookTest.java:136)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant