You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2014/05/19 12:34:34 UTC
[36/45] [OLINGO-260] Filter/orderby and search tests
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9708c4ac/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
index b1b61c8..11f7d07 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
@@ -18,7 +18,6 @@
*/
package org.apache.olingo.fit.proxy.v4;
-
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -29,7 +28,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.UUID;
-
+import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.ext.proxy.EntityContainerFactory;
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
@@ -39,7 +38,6 @@ import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.ope
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row;
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowIndex;
import org.junit.BeforeClass;
-
import org.junit.Test;
/**
@@ -51,8 +49,10 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
@BeforeClass
public static void initContainer() {
- final EntityContainerFactory otcontainerFactory = EntityContainerFactory.getV4(testOpenTypeServiceRootURL);
- otcontainerFactory.getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
+ final EntityContainerFactory<EdmEnabledODataClient> otcontainerFactory =
+ EntityContainerFactory.getV4(testOpenTypeServiceRootURL);
+ otcontainerFactory.getClient().getConfiguration().
+ setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
otcontainer = otcontainerFactory.getEntityContainer(DefaultContainer.class);
assertNotNull(otcontainer);
}
@@ -95,10 +95,10 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
Calendar cal = Calendar.getInstance();
cal.clear();
- cal.setTime(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX").parse("2001-04-05T05:05:05.001+00:01"));
+ cal.setTime(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").parse("2001-04-05T05:05:05.001"));
contact.setLastContacted(cal);
-
+
cal = Calendar.getInstance();
cal.clear();
cal.setTime(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").parse("2001-04-05T05:05:04.001"));
@@ -114,7 +114,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
contact.setInt(Integer.MAX_VALUE);
rowIndex.addAdditionalProperty("aContact", contact);
rowIndex.addAdditionalProperty("aColor", Color.Green);
-
+
otcontainer.flush();
rowIndex = otcontainer.getRowIndex().get(id);
@@ -129,10 +129,10 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
assertEquals(Color.Green, rowIndex.getAdditionalProperty("aColor"));
entityContext.detachAll();
-
+
otcontainer.getRowIndex().delete(id);
otcontainer.flush();
-
+
assertNull(otcontainer.getRowIndex().get(id));
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9708c4ac/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
index aa6f5e2..5b10eb1 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
@@ -91,9 +91,6 @@ public class AsyncTestITCase extends AbstractTestITCase {
assertEquals(204, res.getStatusCode());
}
- /**
- * @see MediaEntityTest#createMediaEntity(com.msopentech.odatajclient.engine.format.ODataPubFormat)
- */
@Test
public void createMediaEntity() throws Exception {
URIBuilder builder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car");