[OLINGO-887] Set timezone fix for testing
This commit is contained in:
parent
a8d1d4c647
commit
d040afe784
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue