Updated Branches: refs/heads/master b395401c2 -> f62dda2d6
fixed the unit test which fails in environments where New York isn't the default time zone Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f62dda2d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f62dda2d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f62dda2d Branch: refs/heads/master Commit: f62dda2d6e92fa0127c1c5b5a5ec59eae100b330 Parents: b395401 Author: cmueller <[email protected]> Authored: Sun May 12 18:55:56 2013 +0200 Committer: cmueller <[email protected]> Committed: Sun May 12 18:55:56 2013 +0200 ---------------------------------------------------------------------- .../camel/component/ical/ICalDataFormatTest.java | 21 +++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/f62dda2d/components/camel-ical/src/test/java/org/apache/camel/component/ical/ICalDataFormatTest.java ---------------------------------------------------------------------- diff --git a/components/camel-ical/src/test/java/org/apache/camel/component/ical/ICalDataFormatTest.java b/components/camel-ical/src/test/java/org/apache/camel/component/ical/ICalDataFormatTest.java index f588401..969e1f0 100644 --- a/components/camel-ical/src/test/java/org/apache/camel/component/ical/ICalDataFormatTest.java +++ b/components/camel-ical/src/test/java/org/apache/camel/component/ical/ICalDataFormatTest.java @@ -46,6 +46,8 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.converter.IOConverter; import org.apache.camel.test.junit4.CamelTestSupport; +import org.junit.After; +import org.junit.Before; import org.junit.Test; /** @@ -53,6 +55,25 @@ import org.junit.Test; */ public class ICalDataFormatTest extends CamelTestSupport { + private java.util.TimeZone defaultTimeZone; + + @Override + @Before + public void setUp() throws Exception { + defaultTimeZone = java.util.TimeZone.getDefault(); + java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("America/New_York")); + + super.setUp(); + } + + @Override + @After + public void tearDown() throws Exception { + java.util.TimeZone.setDefault(defaultTimeZone); + + super.tearDown(); + } + @Test public void testUnmarshal() throws Exception { InputStream stream = IOConverter.toInputStream(new File("src/test/resources/data.ics"));
