[OLINGO-545] TecSvc EDM enhanced
This commit is contained in:
parent
6d41513f47
commit
af1417b3c7
|
@ -330,7 +330,7 @@ public class BasicITCase extends AbstractBaseTestITCase {
|
|||
final ODataClient client = getClient();
|
||||
final ODataObjectFactory factory = client.getObjectFactory();
|
||||
ODataEntity newEntity = factory.newEntity(new FullQualifiedName("olingo.odata.test1", "ETKeyNav"));
|
||||
newEntity.getProperties().add(factory.newComplexProperty("PropertyCompComp", null));
|
||||
newEntity.getProperties().add(factory.newComplexProperty("PropertyCompCompNav", null));
|
||||
// The following properties must not be null
|
||||
newEntity.getProperties().add(factory.newPrimitiveProperty("PropertyString",
|
||||
factory.newPrimitiveValueBuilder().buildString("Test")));
|
||||
|
@ -358,7 +358,7 @@ public class BasicITCase extends AbstractBaseTestITCase {
|
|||
assertEquals(HttpStatusCode.OK.getStatusCode(), entityResponse.getStatusCode());
|
||||
final ODataEntity entity = entityResponse.getBody();
|
||||
assertNotNull(entity);
|
||||
final ODataComplexValue complex = entity.getProperty("PropertyCompComp").getComplexValue()
|
||||
final ODataComplexValue complex = entity.getProperty("PropertyCompCompNav").getComplexValue()
|
||||
.get("PropertyComp").getComplexValue();
|
||||
assertNotNull(complex);
|
||||
final ODataProperty property = complex.get("PropertyInt16");
|
||||
|
|
|
@ -62,13 +62,15 @@ public class BindingITCase extends AbstractBaseTestITCase {
|
|||
private static final String PROPERTY_INT16 = "PropertyInt16";
|
||||
private static final String PROPERTY_STRING = "PropertyString";
|
||||
private static final String PROPERTY_COMP = "PropertyComp";
|
||||
private static final String PROPERTY_COMP_COMP = "PropertyCompComp";
|
||||
private static final String PROPERTY_COMP_NAV = "PropertyCompNav";
|
||||
private static final String PROPERTY_COMP_COMP_NAV = "PropertyCompCompNav";
|
||||
private static final String PROPERTY_COMP_TWO_PRIM = "PropertyCompTwoPrim";
|
||||
private static final String PROPERTY_COMP_ALL_PRIM = "PropertyCompAllPrim";
|
||||
private static final String NAV_PROPERTY_ET_KEY_NAV_ONE = "NavPropertyETKeyNavOne";
|
||||
private static final String NAV_PROPERTY_ET_KEY_NAV_MANY = "NavPropertyETKeyNavMany";
|
||||
private static final String NAV_PROPERTY_ET_TWO_KEY_NAV_MANY = "NavPropertyETTwoKeyNavMany";
|
||||
|
||||
|
||||
@Test
|
||||
public void testCreateBindingSimple() throws EdmPrimitiveTypeException {
|
||||
final ODataClient client = getClient();
|
||||
|
@ -82,7 +84,7 @@ public class BindingITCase extends AbstractBaseTestITCase {
|
|||
entity.getProperties()
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_NAV, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_ALL_PRIM, of.newComplexValue(CT_ALL_PRIM)
|
||||
|
@ -92,7 +94,7 @@ public class BindingITCase extends AbstractBaseTestITCase {
|
|||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")))));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP_NAV, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")))
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))))));
|
||||
|
|
|
@ -65,7 +65,8 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
private static final String PROPERTY_INT16 = "PropertyInt16";
|
||||
private static final String PROPERTY_STRING = "PropertyString";
|
||||
private static final String PROPERTY_COMP = "PropertyComp";
|
||||
private static final String PROPERTY_COMP_COMP = "PropertyCompComp";
|
||||
private static final String PROPERTY_COMP_NAV = "PropertyCompNav";
|
||||
private static final String PROPERTY_COMP_COMP_NAV = "PropertyCompCompNav";
|
||||
private static final String PROPERTY_COMP_TWO_PRIM = "PropertyCompTwoPrim";
|
||||
private static final String PROPERTY_COMP_ALL_PRIM = "PropertyCompAllPrim";
|
||||
private static final String NAV_PROPERTY_ET_KEY_NAV_ONE = "NavPropertyETKeyNavOne";
|
||||
|
@ -90,7 +91,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
entity.getProperties()
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_NAV, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_ALL_PRIM, of.newComplexValue(CT_ALL_PRIM)
|
||||
|
@ -100,7 +101,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")))));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP_NAV, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")))
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))))));
|
||||
|
@ -276,7 +277,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
entity.getProperties()
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_NAV, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_ALL_PRIM, of.newComplexValue(CT_ALL_PRIM)
|
||||
|
@ -286,7 +287,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")))));
|
||||
entity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP_NAV, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("42")))
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 42)))))));
|
||||
|
@ -298,7 +299,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
innerEntity.getProperties()
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("43")));
|
||||
innerEntity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_NAV, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder().buildInt16((short) 431)))));
|
||||
innerEntity.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_ALL_PRIM, of.newComplexValue(CT_ALL_PRIM)
|
||||
|
@ -309,7 +310,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("431")))));
|
||||
innerEntity
|
||||
.getProperties()
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newComplexProperty(PROPERTY_COMP_COMP_NAV, of.newComplexValue(CT_PRIM_COMP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_STRING, of.newPrimitiveValueBuilder().buildString("431")))
|
||||
.add(of.newComplexProperty(PROPERTY_COMP, of.newComplexValue(CT_NAV_FIVE_PROP)
|
||||
.add(of.newPrimitiveProperty(PROPERTY_INT16, of.newPrimitiveValueBuilder()
|
||||
|
@ -335,7 +336,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
|
||||
// Check values
|
||||
assertEquals(431, entityResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(
|
||||
PROPERTY_COMP).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
|
||||
PROPERTY_COMP_NAV).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
|
||||
|
||||
Short innerEntityInt16Key =
|
||||
entityResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(PROPERTY_INT16)
|
||||
|
@ -349,7 +350,7 @@ public class DeepInsertITCase extends AbstractBaseTestITCase {
|
|||
innerRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
|
||||
ODataRetrieveResponse<ODataEntity> innerResponse = innerRequest.execute();
|
||||
|
||||
assertEquals(431, innerResponse.getBody().getProperty(PROPERTY_COMP).getComplexValue().get(PROPERTY_INT16)
|
||||
assertEquals(431, innerResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(PROPERTY_INT16)
|
||||
.getPrimitiveValue().toValue());
|
||||
}
|
||||
|
||||
|
|
|
@ -927,7 +927,7 @@ public class FilterSystemQueryITCase extends AbstractBaseTestITCase {
|
|||
final ODataClient client = getClient();
|
||||
final ODataObjectFactory factory = client.getObjectFactory();
|
||||
ODataEntity newEntity = factory.newEntity(new FullQualifiedName("olingo.odata.test1", "ETKeyNav"));
|
||||
newEntity.getProperties().add(factory.newComplexProperty("PropertyCompComp", null));
|
||||
newEntity.getProperties().add(factory.newComplexProperty("PropertyCompCompNav", null));
|
||||
newEntity.getProperties().add(factory.newPrimitiveProperty("PropertyInt16",
|
||||
factory.newPrimitiveValueBuilder().buildInt16((short) 4)));
|
||||
newEntity.getProperties().add(factory.newPrimitiveProperty("PropertyString",
|
||||
|
@ -959,11 +959,11 @@ public class FilterSystemQueryITCase extends AbstractBaseTestITCase {
|
|||
|
||||
// Do the filter request
|
||||
ODataRetrieveResponse<ODataEntitySet> result =
|
||||
sendRequest("ESKeyNav", "PropertyCompComp/PropertyComp/PropertyInt16 eq 1", cookie);
|
||||
sendRequest("ESKeyNav", "PropertyCompCompNav/PropertyComp/PropertyInt16 eq 1", cookie);
|
||||
assertEquals(3, result.getBody().getEntities().size());
|
||||
|
||||
// Try filter all entries where PropertyCompComp is null
|
||||
result = sendRequest("ESKeyNav", "PropertyCompComp/PropertyComp/PropertyInt16 eq null", cookie);
|
||||
result = sendRequest("ESKeyNav", "PropertyCompCompNav/PropertyComp/PropertyInt16 eq null", cookie);
|
||||
assertEquals(1, result.getBody().getEntities().size());
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public final class NavigationITCase extends AbstractBaseTestITCase {
|
|||
.appendEntitySetSegment("ESKeyNav").appendKeySegment(1)
|
||||
.appendNavigationSegment("NavPropertyETKeyNavOne")
|
||||
.appendNavigationSegment("NavPropertyETKeyNavMany").appendKeySegment(3)
|
||||
.appendPropertySegment("PropertyComp").appendPropertySegment("PropertyInt16").build())
|
||||
.appendPropertySegment("PropertyCompNav").appendPropertySegment("PropertyInt16").build())
|
||||
.execute();
|
||||
assertEquals(HttpStatusCode.OK.getStatusCode(), response.getStatusCode());
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public class DataCreator {
|
|||
return new EntityImpl()
|
||||
.addProperty(createPrimitive("PropertyInt16", propertyInt16))
|
||||
.addProperty(createPrimitive("PropertyString", propertyString))
|
||||
.addProperty(createComplex("PropertyComp",
|
||||
.addProperty(createComplex("PropertyCompNav",
|
||||
createPrimitive("PropertyInt16", 1)))
|
||||
.addProperty(createKeyNavAllPrimComplexValue("PropertyCompAllPrim"))
|
||||
.addProperty(createComplex("PropertyCompTwoPrim",
|
||||
|
@ -136,7 +136,7 @@ public class DataCreator {
|
|||
Arrays.asList(
|
||||
createPrimitive("PropertyInt16", 3),
|
||||
createKeyNavAllPrimComplexValue("PropertyComp"))))
|
||||
.addProperty(createComplex("PropertyCompComp",
|
||||
.addProperty(createComplex("PropertyCompCompNav",
|
||||
createPrimitive("PropertyString", "1"),
|
||||
createComplex("PropertyComp", createPrimitive("PropertyInt16", 1))));
|
||||
}
|
||||
|
|
|
@ -305,12 +305,12 @@ public class EntityTypeProvider {
|
|||
.setProperties(
|
||||
Arrays.asList(
|
||||
PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString_NotNullable,
|
||||
PropertyProvider.propertyComp_CTNavFiveProp,
|
||||
PropertyProvider.propertyCompNav_CTNavFiveProp,
|
||||
PropertyProvider.propertyCompAllPrim_CTAllPrim, PropertyProvider.propertyCompTwoPrim_CTTwoPrim,
|
||||
PropertyProvider.collPropertyString, PropertyProvider.collPropertyInt16,
|
||||
PropertyProvider.collPropertyComp_CTPrimComp,
|
||||
new Property()
|
||||
.setName("PropertyCompComp").setType(ComplexTypeProvider.nameCTCompNav)
|
||||
.setName("PropertyCompCompNav").setType(ComplexTypeProvider.nameCTCompNav)
|
||||
))
|
||||
.setNavigationProperties(
|
||||
Arrays.asList(
|
||||
|
@ -396,8 +396,9 @@ public class EntityTypeProvider {
|
|||
new PropertyRef().setName("PropertyComp/PropertyString").setAlias("KeyAlias2"),
|
||||
new PropertyRef().setName("PropertyCompComp/PropertyComp/PropertyString").setAlias("KeyAlias3")))
|
||||
.setProperties(
|
||||
Arrays.asList(PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComp_CTTwoPrim,
|
||||
PropertyProvider.propertyCompComp_CTCompComp));
|
||||
Arrays.asList(PropertyProvider.propertyInt16_NotNullable,
|
||||
PropertyProvider.propertyComp_CTTwoPrim_NotNullable,
|
||||
PropertyProvider.propertyCompComp_CTCompComp_NotNullable));
|
||||
} else if (entityTypeName.equals(nameETCompMixPrimCollComp)) {
|
||||
return new EntityType()
|
||||
.setName("ETCompMixPrimCollComp")
|
||||
|
|
|
@ -580,6 +580,10 @@ public class PropertyProvider {
|
|||
.setName("PropertyComp")
|
||||
.setType(ComplexTypeProvider.nameCTNavFiveProp);
|
||||
|
||||
public static final Property propertyCompNav_CTNavFiveProp = new Property()
|
||||
.setName("PropertyCompNav")
|
||||
.setType(ComplexTypeProvider.nameCTNavFiveProp);
|
||||
|
||||
public static final Property propertyComp_CTPrimComp_NotNullable = new Property()
|
||||
.setName("PropertyComp")
|
||||
.setType(ComplexTypeProvider.nameCTPrimComp)
|
||||
|
@ -589,6 +593,11 @@ public class PropertyProvider {
|
|||
.setName("PropertyComp")
|
||||
.setType(ComplexTypeProvider.nameCTTwoPrim);
|
||||
|
||||
public static final Property propertyComp_CTTwoPrim_NotNullable = new Property()
|
||||
.setName("PropertyComp")
|
||||
.setType(ComplexTypeProvider.nameCTTwoPrim)
|
||||
.setNullable(false);
|
||||
|
||||
public static final Property propertyCompAllPrim_CTAllPrim = new Property()
|
||||
.setName("PropertyCompAllPrim")
|
||||
.setType(ComplexTypeProvider.nameCTAllPrim);
|
||||
|
@ -597,6 +606,11 @@ public class PropertyProvider {
|
|||
.setName("PropertyCompComp")
|
||||
.setType(ComplexTypeProvider.nameCTCompComp);
|
||||
|
||||
public static final Property propertyCompComp_CTCompComp_NotNullable = new Property()
|
||||
.setName("PropertyCompComp")
|
||||
.setType(ComplexTypeProvider.nameCTCompComp)
|
||||
.setNullable(false);
|
||||
|
||||
public static final Property propertyCompTwoPrim_CTTwoPrim = new Property()
|
||||
.setName("PropertyCompTwoPrim")
|
||||
.setType(ComplexTypeProvider.nameCTTwoPrim);
|
||||
|
|
|
@ -29,7 +29,7 @@ public class TypeDefinitionProvider {
|
|||
public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) {
|
||||
if (nameTDString.equals(typeDefinitionName)) {
|
||||
return new TypeDefinition().setName(nameTDString.getName()).setUnderlyingType(
|
||||
EdmPrimitiveTypeKind.String.getFullQualifiedName());
|
||||
EdmPrimitiveTypeKind.String.getFullQualifiedName()).setMaxLength(15);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ public class UriResourceImplTest {
|
|||
assertEquals(UriResourceKind.complexProperty, impl.getKind());
|
||||
|
||||
EdmEntityType entityType = edm.getEntityType(EntityTypeProvider.nameETKeyNav);
|
||||
EdmProperty property = (EdmProperty) entityType.getProperty("PropertyComp");
|
||||
EdmProperty property = (EdmProperty) entityType.getProperty("PropertyCompNav");
|
||||
impl.setProperty(property);
|
||||
|
||||
assertEquals(property, impl.getProperty());
|
||||
|
|
|
@ -460,36 +460,36 @@ public class TestFullResourcePath {
|
|||
@Test
|
||||
public void runBfuncBnEsRtEntityPpCp() throws Exception {
|
||||
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyComp")
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyCompNav")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
.first()
|
||||
.isEntitySet("ESKeyNav")
|
||||
.n()
|
||||
.isFunction("BFCESKeyNavRTETKeyNav")
|
||||
.n()
|
||||
.isComplex("PropertyComp")
|
||||
.isComplex("PropertyCompNav")
|
||||
.isType(ComplexTypeProvider.nameCTNavFiveProp);
|
||||
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyComp/PropertyInt16")
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyCompNav/PropertyInt16")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
.first()
|
||||
.isEntitySet("ESKeyNav")
|
||||
.n()
|
||||
.isFunction("BFCESKeyNavRTETKeyNav")
|
||||
.n()
|
||||
.isComplex("PropertyComp")
|
||||
.isComplex("PropertyCompNav")
|
||||
.isType(ComplexTypeProvider.nameCTNavFiveProp)
|
||||
.n()
|
||||
.isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false);
|
||||
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyComp/PropertyInt16/$value")
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyCompNav/PropertyInt16/$value")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
.first()
|
||||
.isEntitySet("ESKeyNav")
|
||||
.n()
|
||||
.isFunction("BFCESKeyNavRTETKeyNav")
|
||||
.n()
|
||||
.isComplex("PropertyComp")
|
||||
.isComplex("PropertyCompNav")
|
||||
.isType(ComplexTypeProvider.nameCTNavFiveProp)
|
||||
.n()
|
||||
.isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false)
|
||||
|
@ -1351,7 +1351,7 @@ public class TestFullResourcePath {
|
|||
.n()
|
||||
.isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false);
|
||||
|
||||
testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)/PropertyComp")
|
||||
testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)/PropertyCompNav")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
.first()
|
||||
.isEntitySet("ESKeyNav")
|
||||
|
@ -1360,7 +1360,7 @@ public class TestFullResourcePath {
|
|||
.isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false)
|
||||
.isKeyPredicate(0, "PropertyInt16", "2")
|
||||
.n()
|
||||
.isComplex("PropertyComp");
|
||||
.isComplex("PropertyCompNav");
|
||||
|
||||
testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)/NavPropertyETKeyNavOne")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
|
@ -1387,13 +1387,13 @@ public class TestFullResourcePath {
|
|||
.isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false)
|
||||
.isKeyPredicate(0, "PropertyInt16", "4");
|
||||
|
||||
testUri.run("ESKeyNav(1)/PropertyComp/NavPropertyETTwoKeyNavOne")
|
||||
testUri.run("ESKeyNav(1)/PropertyCompNav/NavPropertyETTwoKeyNavOne")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
.first()
|
||||
.isEntitySet("ESKeyNav")
|
||||
.isKeyPredicate(0, "PropertyInt16", "1")
|
||||
.n()
|
||||
.isComplex("PropertyComp")
|
||||
.isComplex("PropertyCompNav")
|
||||
.n()
|
||||
.isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false);
|
||||
|
||||
|
@ -2500,7 +2500,7 @@ public class TestFullResourcePath {
|
|||
.isSelectText("PropertyInt16")
|
||||
.goSelectItem(0).isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false);
|
||||
|
||||
testUri.run("ESKeyNav", "$expand=NavPropertyETKeyNavOne($select=PropertyComp/PropertyInt16)")
|
||||
testUri.run("ESKeyNav", "$expand=NavPropertyETKeyNavOne($select=PropertyCompNav/PropertyInt16)")
|
||||
.isKind(UriInfoKind.resource)
|
||||
.goPath().first()
|
||||
.goExpand().first()
|
||||
|
@ -2508,7 +2508,7 @@ public class TestFullResourcePath {
|
|||
.isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false)
|
||||
.isType(EntityTypeProvider.nameETKeyNav)
|
||||
.goUpExpandValidator()
|
||||
.isSelectText("PropertyComp/PropertyInt16");
|
||||
.isSelectText("PropertyCompNav/PropertyInt16");
|
||||
|
||||
testUri.runEx("ESKeyNav", "$expand=undefined")
|
||||
.isExSemantic(UriParserSemanticException.MessageKeys.EXPRESSION_PROPERTY_NOT_IN_TYPE);
|
||||
|
@ -4330,8 +4330,8 @@ public class TestFullResourcePath {
|
|||
.goParameter(0).isTypedLiteral(EntityTypeProvider.nameETBaseTwoKeyNav);
|
||||
|
||||
testFilter
|
||||
.runOnETKeyNav("isof(olingo.odata.test1.ETBaseTwoKeyNav) eq true and PropertyComp/PropertyInt16 eq 1")
|
||||
.is("<<<isof(<olingo.odata.test1.ETBaseTwoKeyNav>)> eq <true>> and <<PropertyComp/PropertyInt16> eq <1>>>")
|
||||
.runOnETKeyNav("isof(olingo.odata.test1.ETBaseTwoKeyNav) eq true and PropertyCompNav/PropertyInt16 eq 1")
|
||||
.is("<<<isof(<olingo.odata.test1.ETBaseTwoKeyNav>)> eq <true>> and <<PropertyCompNav/PropertyInt16> eq <1>>>")
|
||||
.root().isBinary(BinaryOperatorKind.AND)
|
||||
.left().isBinary(BinaryOperatorKind.EQ)
|
||||
.left().isMethod(MethodKind.ISOF, 1)
|
||||
|
@ -4378,12 +4378,12 @@ public class TestFullResourcePath {
|
|||
.goParameter(0).goPath().isIt().goUpFilterValidator()
|
||||
.root().left().goParameter(1).isTypedLiteral(ComplexTypeProvider.nameCTTwoBase);
|
||||
|
||||
testFilter.runOnETKeyNav("isof(PropertyComp/PropertyInt16,Edm.Int32)")
|
||||
.is("<isof(<PropertyComp/PropertyInt16>,<Edm.Int32>)>")
|
||||
testFilter.runOnETKeyNav("isof(PropertyCompNav/PropertyInt16,Edm.Int32)")
|
||||
.is("<isof(<PropertyCompNav/PropertyInt16>,<Edm.Int32>)>")
|
||||
.root()
|
||||
.isMethod(MethodKind.ISOF, 2)
|
||||
.goParameter(0).goPath()
|
||||
.first().isComplex("PropertyComp")
|
||||
.first().isComplex("PropertyCompNav")
|
||||
.n().isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false)
|
||||
.goUpFilterValidator()
|
||||
.root().goParameter(1).isTypedLiteral(PropertyProvider.nameInt32);
|
||||
|
@ -4860,10 +4860,10 @@ public class TestFullResourcePath {
|
|||
.first().isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false)
|
||||
.n().isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false);
|
||||
|
||||
testFilter.runOrderByOnETTwoKeyNav("NavPropertyETKeyNavOne/PropertyComp")
|
||||
testFilter.runOrderByOnETTwoKeyNav("NavPropertyETKeyNavOne/PropertyCompNav")
|
||||
.isSortOrder(0, false).goOrder(0).goPath()
|
||||
.first().isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false)
|
||||
.n().isComplex("PropertyComp");
|
||||
.n().isComplex("PropertyCompNav");
|
||||
|
||||
testFilter.runOrderByOnETTwoKeyNav("PropertyComp/PropertyComp/PropertyInt16 eq 1")
|
||||
.isSortOrder(0, false).goOrder(0).left().goPath()
|
||||
|
|
Loading…
Reference in New Issue