olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chri...@apache.org
Subject [1/2] olingo-odata4 git commit: [OLINGO-542] Reported bug cannot be reproduced
Date Fri, 19 Dec 2014 13:00:08 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/master 56cc9bb6c -> 574a65037


[OLINGO-542] Reported bug cannot be reproduced


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/397fbc5e
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/397fbc5e
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/397fbc5e

Branch: refs/heads/master
Commit: 397fbc5e3e4fba6ff8b5b097067c6d1f1f8497d3
Parents: 56cc9bb
Author: Christian Amend <chrisam@apache.org>
Authored: Thu Dec 18 14:23:04 2014 +0100
Committer: Christian Amend <chrisam@apache.org>
Committed: Thu Dec 18 14:23:04 2014 +0100

----------------------------------------------------------------------
 .../olingo/server/core/edm/provider/EdmEntityTypeImplTest.java  | 4 ++++
 .../olingo/server/tecsvc/provider/EntityTypeProvider.java       | 5 +++--
 .../olingo/server/core/serializer/xml/MetadataDocumentTest.java | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/397fbc5e/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
index 344596f..42af891 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
@@ -136,6 +136,10 @@ public class EdmEntityTypeImplTest {
     baseType.setAbstract(true);
     EdmEntityType edmAbstarctBaseType = EdmEntityTypeImpl.getInstance(edm, baseName, baseType);
     
+    assertEquals(2, edmAbstarctBaseType.getPropertyNames().size());
+    assertEquals("Id", edmAbstarctBaseType.getPropertyNames().get(0));
+    assertEquals("Name", edmAbstarctBaseType.getPropertyNames().get(1));
+    
     FullQualifiedName typeName = new FullQualifiedName("namespace", "typeName");
     EntityType type = new EntityType();
     type.setName(typeName.getName());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/397fbc5e/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
index f6b9e0e..4a4668c 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
@@ -407,7 +407,8 @@ public class EntityTypeProvider {
     } else if (entityTypeName.equals(nameETAbstract)) {
       return new EntityType()
           .setName("ETAbstract")
-          .setAbstract(true);
+          .setAbstract(true)
+          .setProperties(Arrays.asList(PropertyProvider.propertyString));
 
     } else if (entityTypeName.equals(nameETAbstractBase)) {
       return new EntityType()
@@ -415,7 +416,7 @@ public class EntityTypeProvider {
           .setBaseType(nameETAbstract)
           .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
           .setProperties(Arrays.asList(
-              PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString));
+              PropertyProvider.propertyInt16_NotNullable));
     }
 
     return null;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/397fbc5e/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
index 8df2b5b..14f7cc9 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
@@ -130,7 +130,7 @@ public class MetadataDocumentTest {
 
     // BaseTypeCheck
     assertThat(metadata, containsString("<EntityType Name=\"ETBase\" BaseType=\"olingo.odata.test1.ETTwoPrim\">"));
-    assertThat(metadata, containsString("<EntityType Name=\"ETAbstract\" Abstract=\"true\"/>"));
+    assertThat(metadata, containsString("<EntityType Name=\"ETAbstract\" Abstract=\"true\">"));
     assertThat(metadata,
         containsString("<EntityType Name=\"ETAbstractBase\" BaseType=\"olingo.odata.test1.ETAbstract\">"));
   }


Mime
View raw message