Repository: wicket Updated Branches: refs/heads/WICKET-6419 769774125 -> e75cb2560
WICKET-6419 Localization of PageParameters Explicitly set the default locale to ENGLISH so that the test doesn't fail on developer machines with DE locale. Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e75cb256 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e75cb256 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e75cb256 Branch: refs/heads/WICKET-6419 Commit: e75cb25605ac64e4b2f6bc149f7f2e1243f824cb Parents: 7697741 Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Authored: Tue Jul 18 23:12:47 2017 +0200 Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Committed: Tue Jul 18 23:12:47 2017 +0200 ---------------------------------------------------------------------- .../mapper/LocaleAwarePageParametersTest.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/e75cb256/wicket-core/src/test/java/org/apache/wicket/core/request/mapper/LocaleAwarePageParametersTest.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/test/java/org/apache/wicket/core/request/mapper/LocaleAwarePageParametersTest.java b/wicket-core/src/test/java/org/apache/wicket/core/request/mapper/LocaleAwarePageParametersTest.java index 01453e9..3087312 100644 --- a/wicket-core/src/test/java/org/apache/wicket/core/request/mapper/LocaleAwarePageParametersTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/core/request/mapper/LocaleAwarePageParametersTest.java @@ -17,6 +17,8 @@ import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; import org.apache.wicket.util.tester.WicketTestCase; +import org.junit.After; +import org.junit.Before; import org.junit.Test; /** @@ -24,6 +26,24 @@ import org.junit.Test; */ public class LocaleAwarePageParametersTest extends WicketTestCase { + private Locale defaultLocale = null; + + @Before + public void before() + { + defaultLocale = Locale.getDefault(Locale.Category.DISPLAY); + Locale.setDefault(Locale.Category.DISPLAY, Locale.ENGLISH); + } + + @After + public void after() + { + if (defaultLocale != null) + { + Locale.setDefault(Locale.Category.DISPLAY, defaultLocale); + } + } + @Override protected WebApplication newApplication() {