[OLINGO-887] Set timezone fix for testing

This commit is contained in:
Christian Amend 2016-02-17 14:48:02 +01:00
parent a8d1d4c647
commit d040afe784
1 changed files with 14 additions and 2 deletions

View File

@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -26,12 +26,24 @@ import java.util.TimeZone;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class EdmDateTest extends PrimitiveTypeBaseTest {
private final EdmPrimitiveType instance = EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.Date);
@Before
public void setup() {
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
}
@After
public void teardown() {
TimeZone.setDefault(null);
}
@Test
public void toUriLiteral() throws Exception {
assertEquals("2009-12-26", instance.toUriLiteral("2009-12-26"));