[ http://issues.apache.org/struts/browse/SHALE-294?page=all ]
Gary VanMatre reassigned SHALE-294:
-----------------------------------
Assignee: Gary VanMatre
> TestCase: CommonsValidatorTestCase fails on different user locales.
> -------------------------------------------------------------------
>
> Key: SHALE-294
> URL: http://issues.apache.org/struts/browse/SHALE-294
> Project: Shale
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.3
> Environment: Operation System country configurations is set to german
> (de_DE)
> Reporter: Ingo D?
> Assigned To: Gary VanMatre
> Priority: Minor
>
> The CommonsValidatorTestCase fails if the user locale or country (I don't
> know exactly) is not set to "en".
> If it is not set to english you got localized error messages and then the
> equals assertions fail.
> -------------------------------------------------------------------------------
> Test set: org.apache.shale.validator.CommonsValidatorTestCase
> -------------------------------------------------------------------------------
> Tests run: 20, Failures: 17, Errors: 0, Skipped: 0, Time elapsed: 2.093 sec
> <<< FAILURE!
> testValidateRequired(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.156 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...is required...> but
> was:<...wird benötigt...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateRequired(CommonsValidatorTestCase.java:295)
> testValidateMaxlength(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.078 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...can not be greater than 5
> characters...> but was:<...darf nicht kleiner als 5 Zeichen sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateMaxlength(CommonsValidatorTestCase.java:353)
> testValidateMinlength(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.094 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...can not be less than 5
> characters...> but was:<...darf nicht kleiner als 5 Zeichen sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateMinlength(CommonsValidatorTestCase.java:412)
> testValidateMask(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.141 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<... invalid...> but was:<...t
> ungültig...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateMask(CommonsValidatorTestCase.java:471)
> testValidateByte(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.078 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...t be a byte...> but was:<...s
> byte sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateByte(CommonsValidatorTestCase.java:527)
> testValidateShort(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.094 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...t be a short...> but
> was:<...s short sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateShort(CommonsValidatorTestCase.java:583)
> testValidateInteger(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.062 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...t be an integer...> but
> was:<...s integer sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateInteger(CommonsValidatorTestCase.java:638)
> testValidateFloat(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.094 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...t be a float...> but
> was:<...s float sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateFloat(CommonsValidatorTestCase.java:694)
> testValidateDouble(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.062 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...t be a double...> but
> was:<...s double sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateDouble(CommonsValidatorTestCase.java:750)
> testValidateLong(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.11 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...t be a long...> but was:<...s
> long sein...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateLong(CommonsValidatorTestCase.java:789)
> testValidateDate(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.062 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<... not a date...> but was:<...t
> kein Datum...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateDate(CommonsValidatorTestCase.java:833)
> testValidateIntRange(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.094 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...is not in the range 1
> through...> but was:<...liegt nicht zwischen 1 und...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateIntRange(CommonsValidatorTestCase.java:894)
> testValidateFloatRange(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.062 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...is not in the range 1.0
> through...> but was:<...liegt nicht zwischen 1.0 und...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateFloatRange(CommonsValidatorTestCase.java:960)
> testValidateDoubleRange(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.094 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<...is not in the range 1.0
> through...> but was:<...liegt nicht zwischen 1.0 und...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateDoubleRange(CommonsValidatorTestCase.java:1022)
> testValidateCreditCard(org.apache.shale.validator.CommonsValidatorTestCase)
> Time elapsed: 0.047 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<... an invalid credit card
> numb...> but was:<...t keine gültige Kreditkartenumm...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateCreditCard(CommonsValidatorTestCase.java:1062)
> testValidateEmail(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.156 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<... an invalid e-mail
> address...> but was:<...t keine gültige E-Mail-Adresse...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateEmail(CommonsValidatorTestCase.java:1123)
> testValidateUrl(org.apache.shale.validator.CommonsValidatorTestCase) Time
> elapsed: 0.063 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:<... an invalid url address...>
> but was:<...t keine gültige URL-Adresse...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at junit.framework.Assert.assertEquals(Assert.java:87)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.checkMessage(CommonsValidatorTestCase.java:1259)
> at
> org.apache.shale.validator.CommonsValidatorTestCase.testValidateUrl(CommonsValidatorTestCase.java:1177)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira