Mercurial > hg > release > thermostat-0.15
changeset 269:f6f3c1cc9332
Fix DisplayableValueTest by setting Locale before/after run.
Reviewed-by: vanaltj
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-May/001176.html
PR 968
author | Roman Kennke <rkennke@redhat.com> |
---|---|
date | Wed, 02 May 2012 16:51:42 +0200 |
parents | 19b44914e3e1 |
children | ca0636885cae |
files | client/src/test/java/com/redhat/thermostat/client/ui/DisplayableValuesTest.java |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/test/java/com/redhat/thermostat/client/ui/DisplayableValuesTest.java Tue May 01 17:16:39 2012 -0400 +++ b/client/src/test/java/com/redhat/thermostat/client/ui/DisplayableValuesTest.java Wed May 02 16:51:42 2012 +0200 @@ -38,10 +38,27 @@ import static org.junit.Assert.assertEquals; +import java.util.Locale; + +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; public class DisplayableValuesTest { + private static Locale defaultLocale; + + @BeforeClass + public static void setUp() { + defaultLocale = Locale.getDefault(); + Locale.setDefault(Locale.US); + } + + @AfterClass + public static void tearDown() { + Locale.setDefault(defaultLocale); + } + @Test public void testBytes() { testBytesOutput("1", "B", DisplayableValues.bytes(1));