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 15:28:12 UTC
[23/50] [abbrv] git commit: [OLINGO-260] provided entity update
integration test on proxy
[OLINGO-260] provided entity update integration test on proxy
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/42c29def
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/42c29def
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/42c29def
Branch: refs/heads/master
Commit: 42c29def0b07b4f5136ffee35691a06c66082550
Parents: d4400f6
Author: fmartelli <fa...@gmail.com>
Authored: Tue May 13 15:16:45 2014 +0200
Committer: Stephan Klevenz <st...@sap.com>
Committed: Mon May 19 14:31:59 2014 +0200
----------------------------------------------------------------------
.../fit/proxy/v3/EntityUpdateTestITCase.java | 4 +--
.../fit/proxy/v4/EntityUpdateTestITCase.java | 27 ++++----------------
2 files changed, 7 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/42c29def/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java
index 9450d29..82660eb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
import java.lang.reflect.Proxy;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
+import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
types.ConcurrencyInfo;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
@@ -113,7 +113,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
@Test
public void concurrentModification() {
Product product = container.getProduct().get(-10);
- final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(product)).getETag();
+ final String etag = ((EntityTypeInvocationHandler) Proxy.getInvocationHandler(product)).getETag();
assertTrue(StringUtils.isNotBlank(etag));
final String baseConcurrency = String.valueOf(System.currentTimeMillis());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/42c29def/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
index 943eda6..cd00901 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
@@ -18,24 +18,20 @@
*/
package org.apache.olingo.fit.proxy.v4;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
-import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
+import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
- PaymentInstrument;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
@@ -109,7 +105,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
@Test
public void concurrentModification() {
Order order = container.getOrders().get(8);
- final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(order)).getETag();
+ final String etag = ((EntityTypeInvocationHandler) Proxy.getInvocationHandler(order)).getETag();
assertTrue(StringUtils.isNotBlank(etag));
order.setShelfLife(BigDecimal.TEN);
@@ -119,17 +115,4 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
order = container.getOrders().get(8);
assertEquals(BigDecimal.TEN, order.getShelfLife());
}
-
- @Test
- public void contained() {
- PaymentInstrument instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901);
-
- final String newName = UUID.randomUUID().toString();
- instrument.setFriendlyName(newName);
-
- container.flush();
-
- instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901);
- assertEquals(newName, instrument.getFriendlyName());
- }
}