You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2008/12/14 10:28:44 UTC

[jira] Resolved: (WICKET-1927) WicketTester.assertErrorMessages uses wrong encoding

     [ https://issues.apache.org/jira/browse/WICKET-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-1927.
----------------------------------------

       Resolution: Invalid
    Fix Version/s: 1.4-RC2

> WicketTester.assertErrorMessages uses wrong encoding
> ----------------------------------------------------
>
>                 Key: WICKET-1927
>                 URL: https://issues.apache.org/jira/browse/WICKET-1927
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-M3
>         Environment: Windows XP PL SP 2, Java 1.6.0_10
>            Reporter: Artur Wronski
>             Fix For: 1.4-RC2
>
>
> WicketTester.assertErrorMessages returns FeedbackMessages in iso-8859-1 encoding.
> Because of this all tests fail when they are using non standard ascii characters  (like polish, german etc) in messages.
> Wicket should AFAIK use UTF-8 encoding or one that was specified by getApplication().getMarkupSettings().setDefaultMarkupEncoding(..).
> Example:
> WicketTester tester = new WicketTester(new MyApp());
> tester.getApplication().getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
> tester.getWicketSession().setLocale(new Locale("pl", "PL"));
> tester.setupRequestAndResponse();
> FormTester formTester = tester.newFormTester("someForm");
> [...]
> formTester.submit("process");
> tester.assertErrorMessages(new String[] { "Pole 'domena' musi zawierać od 3 do 32 znaków." };
> gives:
> junit.framework.AssertionFailedError:
> expect (1):
>    Pole 'domena' musi zawierać od 3 do 32 znaków.
> but was (1):
>    Pole 'domena' musi zawierać od 3 do 32 znaków. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.