jbarberan / beanio

Automatically exported from code.google.com/p/beanio
0 stars 0 forks source link

Locale issue running tests #104

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I ran a build of the code on my swedish Mac which has the following locale:

Locale.getDefault()  == 'sv_SE'

Two test cases failed:

org.beanio.parser.types.TypesParserTest#testFormats

org.beanio.InvalidRecordException: Invalid 'record' record at line 1
 ==> Invalid 'doubleValue':  Type conversion error: Number value '-6.1x' does not match pattern '0.00x'
 ==> Invalid 'floatValue':  Type conversion error: Number value '5.1x' does not match pattern '0.00x'
 ==> Invalid 'bigDecimalValue':  Type conversion error: Number value '10.5x' does not match pattern '0.00x'
    at org.beanio.internal.parser.UnmarshallingContext.validate(UnmarshallingContext.java:196)

org.beanio.parser.types.TypeHandlerLocaleTest#testFieldWithDefault

    Assertion failed: 

assert m.marshal(map).toString() == text
       | |       |    |          |  |
       | |       |    |          |  10.000,"10,000",01.02.2013 00:00:00
       | |       |    |          false
       | |       |    10.000,10 000,01.02.2013 00:00:00
       | |       [int1:10000, int2:10000, date:Fri Feb 01 00:00:00 CET 2013]
       | 10.000,10 000,01.02.2013 00:00:00
       10.000,10 000,01.02.2013 00:00:00

    at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:386)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:658)
    at org.beanio.parser.types.TypeHandlerLocaleTest.testFieldWithDefault(TypeHandlerLocaleTest.groovy:37)

Original issue reported on code.google.com by jo...@fugedi.se on 10 Feb 2014 at 7:09

GoogleCodeExporter commented 8 years ago
I think the code is working as expected, but I'll look into fixing the test 
cases.

Original comment by kevin.s...@gmail.com on 12 Feb 2014 at 3:47