[
https://issues.apache.org/jira/browse/TAPESTRY-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Howard M. Lewis Ship closed TAPESTRY-1300.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.3
> Unit tests require english locale to run succesfully
> ----------------------------------------------------
>
> Key: TAPESTRY-1300
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1300
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.3
> Reporter: Chris Poulsen
> Priority: Trivial
> Fix For: 5.0.3
>
>
> DecimalFormat is localized, so the test against a string with the US decimal
> separator fails, the following patch changes this:
> Index: src/test/java/org/apache/tapestry/corelib/components/OutputTest.java
> ===================================================================
> --- src/test/java/org/apache/tapestry/corelib/components/OutputTest.java
> (revision 511630)
> +++ src/test/java/org/apache/tapestry/corelib/components/OutputTest.java
> (working copy)
> @@ -18,18 +18,26 @@
> import java.text.FieldPosition;
> import java.text.Format;
> import java.text.ParsePosition;
> +import java.util.Locale;
> import org.apache.tapestry.ComponentResources;
> import org.apache.tapestry.MarkupWriter;
> import org.apache.tapestry.test.TapestryTestCase;
> import org.testng.annotations.Test;
> +import org.testng.annotations.BeforeClass;
> public class OutputTest extends TapestryTestCase
> {
> - private final Number _value = new Double(22.7d);
> + private final Number _value = 22.7d;
> - private final Format _format = new DecimalFormat("0.00");
> + private final Format _format = DecimalFormat.getInstance(Locale.US);
> + @BeforeClass
> + public void setUp() {
> + ((DecimalFormat)_format).applyPattern("0.00");
> + }
> +
> +
> @Test
> public void simple_output()
> {
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]