http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java ---------------------------------------------------------------------- diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java index 3658960..e46bca7 100644 --- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java +++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java @@ -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 @@ -63,30 +63,30 @@ public class TestFullResourcePath { public void testFunctionBound_varOverloading() throws Exception { // on ESTwoKeyNav testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()").goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .at(1) - .isUriPathInfoKind(UriResourceKind.function) - .isType(EntityTypeProvider.nameETTwoKeyNav); + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .at(1) + .isUriPathInfoKind(UriResourceKind.function) + .isType(EntityTypeProvider.nameETTwoKeyNav); // with string parameter testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='ABC')").goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .at(1) - .isUriPathInfoKind(UriResourceKind.function) - .isType(EntityTypeProvider.nameETTwoKeyNav); + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .at(1) + .isUriPathInfoKind(UriResourceKind.function) + .isType(EntityTypeProvider.nameETTwoKeyNav); // with string parameter testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()").goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .at(1) - .isUriPathInfoKind(UriResourceKind.function) - .isType(EntityTypeProvider.nameETTwoKeyNav); + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .at(1) + .isUriPathInfoKind(UriResourceKind.function) + .isType(EntityTypeProvider.nameETTwoKeyNav); } @Test @@ -130,32 +130,32 @@ public class TestFullResourcePath { @Test public void runBfuncBnCpropCollRtEs() throws Exception { testUri.run("ESKeyNav(PropertyInt16=1)/CollPropertyComp/olingo.odata.test1.BFCCollCTPrimCompRTESAllPrim()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isUriPathInfoKind(UriResourceKind.complexProperty) - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTPrimComp, true) - .n() - .isFunction("BFCCollCTPrimCompRTESAllPrim"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isUriPathInfoKind(UriResourceKind.complexProperty) + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTPrimComp, true) + .n() + .isFunction("BFCCollCTPrimCompRTESAllPrim"); testUri - .run("ESKeyNav(PropertyInt16=1)/CollPropertyComp/olingo.odata.test1.BFCCollCTPrimCompRTESAllPrim()/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isUriPathInfoKind(UriResourceKind.complexProperty) - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTPrimComp, true) - .n() - .isFunction("BFCCollCTPrimCompRTESAllPrim") - .isType(EntityTypeProvider.nameETAllPrim, true) - .n() - .isUriPathInfoKind(UriResourceKind.count); + .run("ESKeyNav(PropertyInt16=1)/CollPropertyComp/olingo.odata.test1.BFCCollCTPrimCompRTESAllPrim()/$count") + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isUriPathInfoKind(UriResourceKind.complexProperty) + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTPrimComp, true) + .n() + .isFunction("BFCCollCTPrimCompRTESAllPrim") + .isType(EntityTypeProvider.nameETAllPrim, true) + .n() + .isUriPathInfoKind(UriResourceKind.count); } @Test @@ -196,20 +196,20 @@ public class TestFullResourcePath { @Test public void runBfuncBnEntityRtEs() throws Exception { testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.BFCETTwoKeyNavRTESTwoKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .n() - .isFunction("BFCETTwoKeyNavRTESTwoKeyNav"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .n() + .isFunction("BFCETTwoKeyNavRTESTwoKeyNav"); } @Test public void runBfuncBnEntityCastRtEs() throws Exception { testUri - .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" - + "/olingo.odata.test1.BFCETBaseTwoKeyNavRTESTwoKeyNav()") + .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" + + "/olingo.odata.test1.BFCETBaseTwoKeyNavRTESTwoKeyNav()") .isKind(UriInfoKind.resource).goPath() .first() .isEntitySet("ESTwoKeyNav") @@ -221,8 +221,8 @@ public class TestFullResourcePath { .isFunction("BFCETBaseTwoKeyNavRTESTwoKeyNav"); testUri - .run("ESTwoKeyNav/olingo.odata.test1.ETBaseTwoKeyNav(PropertyInt16=1,PropertyString='(''2'')')" - + "/olingo.odata.test1.BFCETBaseTwoKeyNavRTESTwoKeyNav()") + .run("ESTwoKeyNav/olingo.odata.test1.ETBaseTwoKeyNav(PropertyInt16=1,PropertyString='(''2'')')" + + "/olingo.odata.test1.BFCETBaseTwoKeyNavRTESTwoKeyNav()") .isKind(UriInfoKind.resource).goPath() .first() .isEntitySet("ESTwoKeyNav") @@ -278,76 +278,76 @@ public class TestFullResourcePath { @Test public void runBfuncBnEsRtCprop() throws Exception { testUri.run("ESAllPrim/olingo.odata.test1.BFCESAllPrimRTCTAllPrim()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .n() - .isFunction("BFCESAllPrimRTCTAllPrim") - .isType(ComplexTypeProvider.nameCTAllPrim); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .n() + .isFunction("BFCESAllPrimRTCTAllPrim") + .isType(ComplexTypeProvider.nameCTAllPrim); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTCTTwoPrim()/olingo.odata.test1.CTBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTCTTwoPrim") - .isType(ComplexTypeProvider.nameCTTwoPrim, false) - .isTypeFilterOnEntry(ComplexTypeProvider.nameCTBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTCTTwoPrim") + .isType(ComplexTypeProvider.nameCTTwoPrim, false) + .isTypeFilterOnEntry(ComplexTypeProvider.nameCTBase); } @Test public void runBfuncBnEsRtCpropColl() throws Exception { testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTCollCTTwoPrim()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTCollCTTwoPrim") - .isType(ComplexTypeProvider.nameCTTwoPrim, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTCollCTTwoPrim") + .isType(ComplexTypeProvider.nameCTTwoPrim, true); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTCollCTTwoPrim()/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTCollCTTwoPrim") - .isType(ComplexTypeProvider.nameCTTwoPrim, true) - .n() - .isUriPathInfoKind(UriResourceKind.count); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTCollCTTwoPrim") + .isType(ComplexTypeProvider.nameCTTwoPrim, true) + .n() + .isUriPathInfoKind(UriResourceKind.count); } @Test public void runBfuncBnEsRtEntityPpNp() throws Exception { testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTTwoKeyNav()/NavPropertyETKeyNavOne") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTTwoKeyNav") - .n() - .isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTTwoKeyNav") + .n() + .isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTTwoKeyNav()/NavPropertyETKeyNavOne/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTTwoKeyNav") - .n() - .isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false) - .n() - .isUriPathInfoKind(UriResourceKind.ref); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTTwoKeyNav") + .n() + .isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false) + .n() + .isUriPathInfoKind(UriResourceKind.ref); testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/NavPropertyETMediaOne/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESKeyNavRTETKeyNav") - .n() - .isNavProperty("NavPropertyETMediaOne", EntityTypeProvider.nameETMedia, false) - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESKeyNavRTETKeyNav") + .n() + .isNavProperty("NavPropertyETMediaOne", EntityTypeProvider.nameETMedia, false) + .n() + .isValue(); testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNavParam(ParameterString='1')" + "/NavPropertyETTwoKeyNavOne") @@ -420,9 +420,9 @@ public class TestFullResourcePath { .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false); testUri.runEx("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNavParam(WrongParameter='1')") - .isExSemantic(UriParserSemanticException.MessageKeys.UNKNOWN_PART); + .isExSemantic(UriParserSemanticException.MessageKeys.UNKNOWN_PART); testUri.runEx("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNavParam(ParameterString=wrong)") - .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); + .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); } @Test @@ -440,8 +440,8 @@ public class TestFullResourcePath { .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav); testUri - .run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()(PropertyInt16=1,PropertyString='2')" - + "/NavPropertyETTwoKeyNavOne/olingo.odata.test1.ETTwoBaseTwoKeyNav") + .run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()(PropertyInt16=1,PropertyString='2')" + + "/NavPropertyETTwoKeyNavOne/olingo.odata.test1.ETTwoBaseTwoKeyNav") .isKind(UriInfoKind.resource).goPath() .first() .isEntitySet("ESTwoKeyNav") @@ -461,40 +461,40 @@ public class TestFullResourcePath { public void runBfuncBnEsRtEntityPpCp() throws Exception { testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyCompNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESKeyNavRTETKeyNav") - .n() - .isComplex("PropertyCompNav") - .isType(ComplexTypeProvider.nameCTNavFiveProp); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESKeyNavRTETKeyNav") + .n() + .isComplex("PropertyCompNav") + .isType(ComplexTypeProvider.nameCTNavFiveProp); testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyCompNav/PropertyInt16") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESKeyNavRTETKeyNav") - .n() - .isComplex("PropertyCompNav") - .isType(ComplexTypeProvider.nameCTNavFiveProp) - .n() - .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESKeyNavRTETKeyNav") + .n() + .isComplex("PropertyCompNav") + .isType(ComplexTypeProvider.nameCTNavFiveProp) + .n() + .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyCompNav/PropertyInt16/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESKeyNavRTETKeyNav") - .n() - .isComplex("PropertyCompNav") - .isType(ComplexTypeProvider.nameCTNavFiveProp) - .n() - .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false) - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESKeyNavRTETKeyNav") + .n() + .isComplex("PropertyCompNav") + .isType(ComplexTypeProvider.nameCTNavFiveProp) + .n() + .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false) + .n() + .isValue(); } @@ -536,24 +536,24 @@ public class TestFullResourcePath { @Test public void runBfuncBnEsRtEntityPpSp() throws Exception { testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyInt16") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESKeyNavRTETKeyNav") - .n() - .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESKeyNavRTETKeyNav") + .n() + .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); testUri.run("ESKeyNav/olingo.odata.test1.BFCESKeyNavRTETKeyNav()/PropertyInt16/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESKeyNavRTETKeyNav") - .n() - .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false) - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESKeyNavRTETKeyNav") + .n() + .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false) + .n() + .isValue(); } @@ -561,57 +561,57 @@ public class TestFullResourcePath { public void runBfuncBnEsRtEs() throws Exception { testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='2')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") - .isParameter(0, "ParameterString", "'2'") - .isType(EntityTypeProvider.nameETTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") + .isParameter(0, "ParameterString", "'2'") + .isType(EntityTypeProvider.nameETTwoKeyNav); testUri.run("ESKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='3')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") - .isParameter(0, "ParameterString", "'3'") - .isType(EntityTypeProvider.nameETTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") + .isParameter(0, "ParameterString", "'3'") + .isType(EntityTypeProvider.nameETTwoKeyNav); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .n() + .isCount(); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()(PropertyInt16=1,PropertyString='2')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTESTwoKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'"); } @@ -637,165 +637,165 @@ public class TestFullResourcePath { @Test public void runBfuncBnEsRtPrim() throws Exception { testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTString()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTString"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTString"); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTString()/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTString") - .isType(PropertyProvider.nameString) - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTString") + .isType(PropertyProvider.nameString) + .n() + .isValue(); } @Test public void runbfuncBnEsRtPrimColl() throws Exception { testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTCollString()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTCollString") - .isType(PropertyProvider.nameString, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTCollString") + .isType(PropertyProvider.nameString, true); testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTCollString()/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isFunction("BFCESTwoKeyNavRTCollString") - .isType(PropertyProvider.nameString, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isFunction("BFCESTwoKeyNavRTCollString") + .isType(PropertyProvider.nameString, true) + .n() + .isCount(); } @Test public void runBfuncBnPpropCollRtEs() throws Exception { testUri.run("ESKeyNav(1)/CollPropertyString/olingo.odata.test1.BFCCollStringRTESTwoKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) - .n() - .isFunction("BFCCollStringRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) + .n() + .isFunction("BFCCollStringRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav, true); testUri.run("ESKeyNav(1)/CollPropertyString/olingo.odata.test1.BFCCollStringRTESTwoKeyNav()/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) - .n() - .isFunction("BFCCollStringRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) + .n() + .isFunction("BFCCollStringRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .n() + .isCount(); } @Test public void runBfuncBnPpropRtEs() throws Exception { testUri.run("ESKeyNav(1)/PropertyString/olingo.odata.test1.BFCStringRTESTwoKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false) - .n() - .isFunction("BFCStringRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false) + .n() + .isFunction("BFCStringRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav, true); testUri.run("ESKeyNav(1)/PropertyString/olingo.odata.test1.BFCStringRTESTwoKeyNav()/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false) - .n() - .isFunction("BFCStringRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false) + .n() + .isFunction("BFCStringRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .n() + .isCount(); testUri.run("ESKeyNav(1)/PropertyString/olingo.odata.test1.BFCStringRTESTwoKeyNav()/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false) - .n() - .isFunction("BFCStringRTESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false) + .n() + .isFunction("BFCStringRTESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .n() + .isRef(); } @Test public void runBfuncBnSingleRtEs() throws Exception { testUri.run("SINav/olingo.odata.test1.BFCSINavRTESTwoKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav, false) - .n() - .isFunction("BFCSINavRTESTwoKeyNav"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav, false) + .n() + .isFunction("BFCSINavRTESTwoKeyNav"); } @Test public void runBfuncBnSingleCastRtEs() throws Exception { testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/olingo.odata.test1.BFCETBaseTwoKeyNavRTESBaseTwoKey()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav, false) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isFunction("BFCETBaseTwoKeyNavRTESBaseTwoKey"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav, false) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isFunction("BFCETBaseTwoKeyNavRTESBaseTwoKey"); } @Test public void runActionBound_on_EntityEntry() throws Exception { testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.BAETTwoKeyNavRTETTwoKeyNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .n() - .isAction("BAETTwoKeyNavRTETTwoKeyNav"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .n() + .isAction("BAETTwoKeyNavRTETTwoKeyNav"); testUri.run("ESKeyNav(PropertyInt16=1)/olingo.odata.test1.BAETTwoKeyNavRTETTwoKeyNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isAction("BAETTwoKeyNavRTETTwoKeyNav"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isAction("BAETTwoKeyNavRTETTwoKeyNav"); } @Test public void runActionBound_on_EntityCollection() throws Exception { testUri.run("ESTwoKeyNav/olingo.odata.test1.BAESTwoKeyNavRTESTwoKeyNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .n() - .isAction("BAESTwoKeyNavRTESTwoKeyNav"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .n() + .isAction("BAESTwoKeyNavRTESTwoKeyNav"); } @Test @@ -803,23 +803,23 @@ public class TestFullResourcePath { // on primitive testUri.run("ESAllPrim(1)/PropertyString/olingo.odata.test1.BFCStringRTESTwoKeyNav()") - .goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .isType(EntityTypeProvider.nameETAllPrim, false) - .at(1) - .isUriPathInfoKind(UriResourceKind.primitiveProperty) - .isType(PropertyProvider.nameString); + .goPath() + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .isType(EntityTypeProvider.nameETAllPrim, false) + .at(1) + .isUriPathInfoKind(UriResourceKind.primitiveProperty) + .isType(PropertyProvider.nameString); // on collection of primitive testUri.run("ESCollAllPrim(1)/CollPropertyString/olingo.odata.test1.BFCCollStringRTESTwoKeyNav()") - .goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .isType(EntityTypeProvider.nameETCollAllPrim, false) - .at(1) - .isUriPathInfoKind(UriResourceKind.primitiveProperty) - .isType(PropertyProvider.nameString); + .goPath() + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .isType(EntityTypeProvider.nameETCollAllPrim, false) + .at(1) + .isUriPathInfoKind(UriResourceKind.primitiveProperty) + .isType(PropertyProvider.nameString); // on complex testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='ABC')" @@ -835,14 +835,14 @@ public class TestFullResourcePath { // on collection of complex testUri.run("ESKeyNav(1)/CollPropertyComp/olingo.odata.test1.BFCCollCTPrimCompRTESAllPrim()") - .goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .at(1) - .isType(ComplexTypeProvider.nameCTPrimComp, true) - .at(2) - .isUriPathInfoKind(UriResourceKind.function) - .isType(EntityTypeProvider.nameETAllPrim); + .goPath() + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .at(1) + .isType(ComplexTypeProvider.nameCTPrimComp, true) + .at(2) + .isUriPathInfoKind(UriResourceKind.function) + .isType(EntityTypeProvider.nameETAllPrim); // on entity testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='ABC')" @@ -857,12 +857,12 @@ public class TestFullResourcePath { // on collection of entity testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav()") - .goPath() - .at(0) - .isUriPathInfoKind(UriResourceKind.entitySet) - .isType(EntityTypeProvider.nameETTwoKeyNav, true) - .at(1).isUriPathInfoKind(UriResourceKind.function) - .isType(EntityTypeProvider.nameETTwoKeyNav); + .goPath() + .at(0) + .isUriPathInfoKind(UriResourceKind.entitySet) + .isType(EntityTypeProvider.nameETTwoKeyNav, true) + .at(1).isUriPathInfoKind(UriResourceKind.function) + .isType(EntityTypeProvider.nameETTwoKeyNav); } @Test @@ -895,12 +895,12 @@ public class TestFullResourcePath { @Test public void runCrossjoin() throws Exception { testUri.run("$crossjoin(ESKeyNav)") - .isKind(UriInfoKind.crossjoin) - .isCrossJoinEntityList(Arrays.asList("ESKeyNav")); + .isKind(UriInfoKind.crossjoin) + .isCrossJoinEntityList(Arrays.asList("ESKeyNav")); testUri.run("$crossjoin(ESKeyNav, ESTwoKeyNav)") - .isKind(UriInfoKind.crossjoin) - .isCrossJoinEntityList(Arrays.asList("ESKeyNav", "ESTwoKeyNav")); + .isKind(UriInfoKind.crossjoin) + .isCrossJoinEntityList(Arrays.asList("ESKeyNav", "ESTwoKeyNav")); } @Test @@ -909,71 +909,71 @@ public class TestFullResourcePath { testUri.runEx("$crossjoin/error").isExSyntax(UriParserSyntaxException.MessageKeys.MUST_BE_LAST_SEGMENT); testUri.runEx("$crossjoin()").isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX); testUri.runEx("$crossjoin(ESKeyNav, ESTwoKeyNav)/invalid") - .isExSyntax(UriParserSyntaxException.MessageKeys.MUST_BE_LAST_SEGMENT); + .isExSyntax(UriParserSyntaxException.MessageKeys.MUST_BE_LAST_SEGMENT); } @Test public void runEntityId() throws Exception { testUri.run("$entity", "$id=ESKeyNav(1)") - .isKind(UriInfoKind.entityId) - .isIdText("ESKeyNav(1)"); + .isKind(UriInfoKind.entityId) + .isIdText("ESKeyNav(1)"); testUri.run("$entity/olingo.odata.test1.ETKeyNav", "$id=ESKeyNav(1)") - .isKind(UriInfoKind.entityId) - .isEntityType(EntityTypeProvider.nameETKeyNav) - .isIdText("ESKeyNav(1)"); + .isKind(UriInfoKind.entityId) + .isEntityType(EntityTypeProvider.nameETKeyNav) + .isIdText("ESKeyNav(1)"); } @Test public void runEsName() throws Exception { testUri.run("ESAllPrim") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .isType(EntityTypeProvider.nameETAllPrim, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .isType(EntityTypeProvider.nameETAllPrim, true); testUri.run("ESAllPrim/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .isType(EntityTypeProvider.nameETAllPrim, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .isType(EntityTypeProvider.nameETAllPrim, true) + .n() + .isCount(); } @Test public void runEsNameError() { testUri.runEx("ESAllPrim/$count/$ref") - .isExSemantic(UriParserSemanticException.MessageKeys.ONLY_FOR_TYPED_PROPERTIES); + .isExSemantic(UriParserSemanticException.MessageKeys.ONLY_FOR_TYPED_PROPERTIES); testUri.runEx("ESAllPrim/$ref/$count") - .isExSemantic(UriParserSemanticException.MessageKeys.ONLY_FOR_TYPED_PARTS); + .isExSemantic(UriParserSemanticException.MessageKeys.ONLY_FOR_TYPED_PARTS); testUri.runEx("ESAllPrim/$ref/invalid") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_PART_ONLY_FOR_TYPED_PARTS); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_PART_ONLY_FOR_TYPED_PARTS); testUri.runEx("ESAllPrim/$count/invalid") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_PART_ONLY_FOR_TYPED_PARTS); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_PART_ONLY_FOR_TYPED_PARTS); testUri.runEx("ESAllPrim/PropertyString") - .isExSemantic(UriParserSemanticException.MessageKeys.PROPERTY_AFTER_COLLECTION); + .isExSemantic(UriParserSemanticException.MessageKeys.PROPERTY_AFTER_COLLECTION); testUri.runEx("ESAllPrim(1)/whatever") - .isExSemantic(UriParserSemanticException.MessageKeys.PROPERTY_NOT_IN_TYPE); + .isExSemantic(UriParserSemanticException.MessageKeys.PROPERTY_NOT_IN_TYPE); testUri.runEx("ESAllPrim(PropertyInt16)") - .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); + .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); testUri.runEx("ESAllPrim(PropertyInt16=)") - .isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX); + .isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX); testUri.runEx("ESAllPrim(PropertyInt16=1,Invalid='1')") - .isExSemantic(UriParserSemanticException.MessageKeys.WRONG_NUMBER_OF_KEY_PROPERTIES); + .isExSemantic(UriParserSemanticException.MessageKeys.WRONG_NUMBER_OF_KEY_PROPERTIES); testUri.runEx("ESBase/olingo.odata.test1.ETBase/PropertyInt16") - .isExSemantic(UriParserSemanticException.MessageKeys.PROPERTY_AFTER_COLLECTION); + .isExSemantic(UriParserSemanticException.MessageKeys.PROPERTY_AFTER_COLLECTION); testUri.runEx("ETBaseTwoKeyTwoPrim/olingo.odata.test1.ETBaseTwoKeyTwoPrim" + "/olingo.odata.test1.ETTwoBaseTwoKeyTwoPrim") .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); testUri.runEx("ETBaseTwoKeyTwoPrim/olingo.odata.test1.ETBaseTwoKeyTwoPrim(1)/olingo.odata.test1.ETAllKey") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); testUri.runEx("ETBaseTwoKeyTwoPrim(1)/olingo.odata.test1.ETBaseTwoKeyTwoPrim('1')/olingo.odata.test1.ETAllKey") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); testUri.runEx("ETBaseTwoKeyTwoPrim(1)/olingo.odata.test1.ETBaseTwoKeyTwoPrim" + "/olingo.odata.test1.ETTwoBaseTwoKeyTwoPrim") @@ -984,51 +984,51 @@ public class TestFullResourcePath { .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); testUri.runEx("ETBaseTwoKeyTwoPrim/olingo.odata.test1.ETAllKey") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); testUri.runEx("ETBaseTwoKeyTwoPrim()") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); testUri.runEx("ESAllNullable(1)/CollPropertyString/$value") - .isExSemantic(UriParserSemanticException.MessageKeys.ONLY_FOR_TYPED_PARTS); + .isExSemantic(UriParserSemanticException.MessageKeys.ONLY_FOR_TYPED_PARTS); testUri.runEx("ETMixPrimCollComp(1)/ComplexProperty/$value") - .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND); } @Test public void runEsNameCast() throws Exception { testUri.run("ESTwoPrim/olingo.odata.test1.ETBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim, true) - .isTypeFilterOnCollection(EntityTypeProvider.nameETBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim, true) + .isTypeFilterOnCollection(EntityTypeProvider.nameETBase); testUri.run("ESTwoPrim/olingo.odata.test1.ETBase(-32768)/olingo.odata.test1.ETTwoBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim, false) - .isTypeFilterOnCollection(EntityTypeProvider.nameETBase) - .isKeyPredicate(0, "PropertyInt16", "-32768") - .isTypeFilterOnEntry(EntityTypeProvider.nameETTwoBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim, false) + .isTypeFilterOnCollection(EntityTypeProvider.nameETBase) + .isKeyPredicate(0, "PropertyInt16", "-32768") + .isTypeFilterOnEntry(EntityTypeProvider.nameETTwoBase); testUri.run("ESTwoPrim/olingo.odata.test1.ETTwoBase(-32768)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim, false) - .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase) - .isKeyPredicate(0, "PropertyInt16", "-32768"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim, false) + .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase) + .isKeyPredicate(0, "PropertyInt16", "-32768"); testUri.run("ESTwoPrim/Namespace1_Alias.ETTwoBase(-32768)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim, false) - .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase) - .isKeyPredicate(0, "PropertyInt16", "-32768"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim, false) + .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase) + .isKeyPredicate(0, "PropertyInt16", "-32768"); } @@ -1036,15 +1036,15 @@ public class TestFullResourcePath { public void runEsNamePpSpCast() throws Exception { testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav/PropertyDate") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isPrimitiveProperty("PropertyDate", PropertyProvider.nameDate, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isPrimitiveProperty("PropertyDate", PropertyProvider.nameDate, false); testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" + "/PropertyComp/PropertyInt16") @@ -1064,28 +1064,28 @@ public class TestFullResourcePath { @Test public void runEsNameKey() throws Exception { testUri.run("ESCollAllPrim(1)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESCollAllPrim"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESCollAllPrim"); testUri.run("ESCollAllPrim(PropertyInt16=1)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESCollAllPrim"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESCollAllPrim"); testUri.run("ESFourKeyAlias(PropertyInt16=1,KeyAlias1=2,KeyAlias2='3',KeyAlias3='4')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESFourKeyAlias") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "KeyAlias1", "2") - .isKeyPredicate(2, "KeyAlias2", "'3'") - .isKeyPredicate(3, "KeyAlias3", "'4'"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESFourKeyAlias") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "KeyAlias1", "2") + .isKeyPredicate(2, "KeyAlias2", "'3'") + .isKeyPredicate(3, "KeyAlias3", "'4'"); testUri.runEx("ESTwoPrim(wrong)") - .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); + .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); testUri.runEx("ESTwoPrim(PropertyInt16=wrong)") - .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); + .isExSemantic(UriParserSemanticException.MessageKeys.INVALID_KEY_VALUE); } @Test @@ -1124,150 +1124,150 @@ public class TestFullResourcePath { // .isExSemantic(UriParserSemanticException.MessageKeys.xxx); testUri.runEx("ESBase/olingo.odata.test1.ETTwoPrim(1)") - .isExSemantic(UriParserSemanticException.MessageKeys.INCOMPATIBLE_TYPE_FILTER); + .isExSemantic(UriParserSemanticException.MessageKeys.INCOMPATIBLE_TYPE_FILTER); testUri.run("ESTwoPrim(1)/olingo.odata.test1.ETBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim) - .isKeyPredicate(0, "PropertyInt16", "1") - .isTypeFilterOnEntry(EntityTypeProvider.nameETBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim) + .isKeyPredicate(0, "PropertyInt16", "1") + .isTypeFilterOnEntry(EntityTypeProvider.nameETBase); testUri.run("ESTwoPrim(1)/olingo.odata.test1.ETTwoBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim) - .isKeyPredicate(0, "PropertyInt16", "1") - .isTypeFilterOnEntry(EntityTypeProvider.nameETTwoBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim) + .isKeyPredicate(0, "PropertyInt16", "1") + .isTypeFilterOnEntry(EntityTypeProvider.nameETTwoBase); testUri.run("ESTwoPrim/olingo.odata.test1.ETBase(1)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim) - .isKeyPredicate(0, "PropertyInt16", "1") - .isTypeFilterOnCollection(EntityTypeProvider.nameETBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim) + .isKeyPredicate(0, "PropertyInt16", "1") + .isTypeFilterOnCollection(EntityTypeProvider.nameETBase); testUri.run("ESTwoPrim/olingo.odata.test1.ETTwoBase(1)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim) - .isKeyPredicate(0, "PropertyInt16", "1") - .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim) + .isKeyPredicate(0, "PropertyInt16", "1") + .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase); testUri.run("ESTwoPrim/olingo.odata.test1.ETBase(1)/olingo.odata.test1.ETTwoBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim) - .isKeyPredicate(0, "PropertyInt16", "1") - .isTypeFilterOnCollection(EntityTypeProvider.nameETBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim) + .isKeyPredicate(0, "PropertyInt16", "1") + .isTypeFilterOnCollection(EntityTypeProvider.nameETBase); testUri.run("ESTwoPrim/olingo.odata.test1.ETTwoBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoPrim") - .isType(EntityTypeProvider.nameETTwoPrim) - .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoPrim") + .isType(EntityTypeProvider.nameETTwoPrim) + .isTypeFilterOnCollection(EntityTypeProvider.nameETTwoBase); } @Test public void runEsNameParaKeysCast() throws Exception { testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav); testUri.run("ESTwoKeyNav/olingo.odata.test1.ETBaseTwoKeyNav(PropertyInt16=1,PropertyString='2')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav) - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav) + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'"); } @Test public void run_EsNamePpCp() throws Exception { testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .n() + .isComplex("PropertyComp"); testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/PropertyComp/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .n() - .isComplex("PropertyComp") - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .n() + .isComplex("PropertyComp") + .n() + .isComplex("PropertyComp"); } @Test public void runEsNamePpCpColl() throws Exception { testUri.run("ESMixPrimCollComp(5)/CollPropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESMixPrimCollComp") - .isKeyPredicate(0, "PropertyInt16", "5") - .n() - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTTwoPrim, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESMixPrimCollComp") + .isKeyPredicate(0, "PropertyInt16", "5") + .n() + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTTwoPrim, true); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavOne/CollPropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false) - .n() - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTPrimComp, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false) + .n() + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTPrimComp, true); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavOne/CollPropertyComp/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .n() - .isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false) - .n() - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTPrimComp, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .n() + .isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false) + .n() + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTPrimComp, true) + .n() + .isCount(); } @Test public void runEsNamePpCpCast() throws Exception { testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESTwoKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESTwoKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isComplex("PropertyComp"); testUri - .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" - + "/PropertyComp/PropertyComp") + .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" + + "/PropertyComp/PropertyComp") .isKind(UriInfoKind.resource).goPath() .first() .isEntitySet("ESTwoKeyNav") @@ -1281,8 +1281,8 @@ public class TestFullResourcePath { .isComplex("PropertyComp"); testUri - .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" - + "/PropertyCompTwoPrim/olingo.odata.test1.CTBase") + .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" + + "/PropertyCompTwoPrim/olingo.odata.test1.CTBase") .isKind(UriInfoKind.resource).goPath() .first() .isEntitySet("ESTwoKeyNav") @@ -1297,8 +1297,8 @@ public class TestFullResourcePath { .isTypeFilter(ComplexTypeProvider.nameCTBase); testUri - .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" - + "/PropertyCompTwoPrim/olingo.odata.test1.CTTwoBase") + .run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')/olingo.odata.test1.ETBaseTwoKeyNav" + + "/PropertyCompTwoPrim/olingo.odata.test1.CTTwoBase") .isKind(UriInfoKind.resource).goPath() .first() .isEntitySet("ESTwoKeyNav") @@ -1315,63 +1315,63 @@ public class TestFullResourcePath { @Test public void runNsNamePpNp() throws Exception { testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, true); testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "2"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "2"); testUri.run("ESKeyNav(PropertyInt16=1)/NavPropertyETKeyNavMany(PropertyInt16=2)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "2"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "2"); testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)/PropertyInt16") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "2") - .n() - .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "2") + .n() + .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)/PropertyCompNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "2") - .n() - .isComplex("PropertyCompNav"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "2") + .n() + .isComplex("PropertyCompNav"); testUri.run("ESKeyNav(1)/NavPropertyETKeyNavMany(2)/NavPropertyETKeyNavOne") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "2") - .n() - .isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "2") + .n() + .isNavProperty("NavPropertyETKeyNavOne", EntityTypeProvider.nameETKeyNav, false); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany(PropertyInt16=2,PropertyString='3')" + "/NavPropertyETKeyNavMany(4)") @@ -1388,14 +1388,14 @@ public class TestFullResourcePath { .isKeyPredicate(0, "PropertyInt16", "4"); testUri.run("ESKeyNav(1)/PropertyCompNav/NavPropertyETTwoKeyNavOne") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isComplex("PropertyCompNav") - .n() - .isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isComplex("PropertyCompNav") + .n() + .isNavProperty("NavPropertyETTwoKeyNavOne", EntityTypeProvider.nameETTwoKeyNav, false); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany(PropertyInt16=2,PropertyString='(3)')" + "/PropertyComp/PropertyComp/PropertyInt16") @@ -1415,15 +1415,15 @@ public class TestFullResourcePath { .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); testUri.run("ESKeyNav(1)/NavPropertyETMediaMany(2)/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETMediaMany", EntityTypeProvider.nameETMedia, false) - .isKeyPredicate(0, "PropertyInt16", "2") - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETMediaMany", EntityTypeProvider.nameETMedia, false) + .isKeyPredicate(0, "PropertyInt16", "2") + .n() + .isValue(); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany(PropertyInt16=2,PropertyString='3')" + "/NavPropertyETKeyNavOne/NavPropertyETMediaOne/$value") @@ -1545,128 +1545,128 @@ public class TestFullResourcePath { public void runEsNamePpNpRc() throws Exception { // checks for using referential constrains to fill missing keys testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany('2')").goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) - .isKeyPredicateRef(0, "PropertyInt16", "PropertyInt16") - .isKeyPredicate(1, "PropertyString", "'2'"); + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) + .isKeyPredicateRef(0, "PropertyInt16", "PropertyInt16") + .isKeyPredicate(1, "PropertyString", "'2'"); testUri.run("ESKeyNav(PropertyInt16=1)/NavPropertyETTwoKeyNavMany(PropertyString='2')").goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) - .isKeyPredicateRef(0, "PropertyInt16", "PropertyInt16") - .isKeyPredicate(1, "PropertyString", "'2'"); + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) + .isKeyPredicateRef(0, "PropertyInt16", "PropertyInt16") + .isKeyPredicate(1, "PropertyString", "'2'"); } @Test public void runEsNamePpSp() throws Exception { testUri.run("ESAllPrim(1)/PropertyByte") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("PropertyByte", PropertyProvider.nameByte, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("PropertyByte", PropertyProvider.nameByte, false); testUri.run("ESAllPrim(1)/PropertyByte/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("PropertyByte", PropertyProvider.nameByte, false) - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("PropertyByte", PropertyProvider.nameByte, false) + .n() + .isValue(); testUri.run("ESMixPrimCollComp(1)/PropertyComp/PropertyString") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESMixPrimCollComp") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isComplex("PropertyComp") - .n() - .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESMixPrimCollComp") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isComplex("PropertyComp") + .n() + .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false); } @Test public void runEsNamePpSpColl() throws Exception { testUri.run("ESCollAllPrim(1)/CollPropertyString") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESCollAllPrim") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESCollAllPrim") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany(PropertyInt16=2,PropertyString='3')/CollPropertyString") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany(PropertyInt16=2,PropertyString='3')/CollPropertyString/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "2") - .isKeyPredicate(1, "PropertyString", "'3'") - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "2") + .isKeyPredicate(1, "PropertyString", "'3'") + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) + .n() + .isCount(); } @Test public void runEsNameRef() throws Exception { testUri.run("ESAllPrim/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .n() + .isRef(); testUri.run("ESAllPrim(-32768)/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESAllPrim") - .isKeyPredicate(0, "PropertyInt16", "-32768") - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESAllPrim") + .isKeyPredicate(0, "PropertyInt16", "-32768") + .n() + .isRef(); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, true) - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, true) + .n() + .isRef(); testUri.run("ESKeyNav(1)/NavPropertyETTwoKeyNavMany(PropertyInt16=1,PropertyString='2')/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isEntitySet("ESKeyNav") - .isKeyPredicate(0, "PropertyInt16", "1") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'") - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isEntitySet("ESKeyNav") + .isKeyPredicate(0, "PropertyInt16", "1") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'") + .n() + .isRef(); } @Test @@ -1710,51 +1710,51 @@ public class TestFullResourcePath { public void runFunctionImpEntity() throws Exception { testUri.run("FICRTETKeyNav()") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTETKeyNav") - .isFunction("UFCRTETKeyNav") - .isType(EntityTypeProvider.nameETKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTETKeyNav") + .isFunction("UFCRTETKeyNav") + .isType(EntityTypeProvider.nameETKeyNav); testUri.run("FICRTETTwoKeyNavParam(ParameterInt16=1)(PropertyInt16=2,PropertyString='3')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTETTwoKeyNavParam") - .isParameter(0, "ParameterInt16", "1") - .isKeyPredicate(0, "PropertyInt16", "2") - .isKeyPredicate(1, "PropertyString", "'3'"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTETTwoKeyNavParam") + .isParameter(0, "ParameterInt16", "1") + .isKeyPredicate(0, "PropertyInt16", "2") + .isKeyPredicate(1, "PropertyString", "'3'"); testUri.run("FICRTESMedia(ParameterInt16=1)/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTESMedia") - .isFunction("UFCRTETMedia") - .n() - .isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTESMedia") + .isFunction("UFCRTETMedia") + .n() + .isValue(); testUri.run("FICRTETKeyNav()/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTETKeyNav") - .isFunction("UFCRTETKeyNav") - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTETKeyNav") + .isFunction("UFCRTETKeyNav") + .n() + .isRef(); testUri.run("FICRTETTwoKeyNavParam(ParameterInt16=1)/$ref") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTETTwoKeyNavParam") - .isFunction("UFCRTETTwoKeyNavParam") - .n() - .isRef(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTETTwoKeyNavParam") + .isFunction("UFCRTETTwoKeyNavParam") + .n() + .isRef(); testUri.run("FICRTETTwoKeyNavParam(ParameterInt16=1)/olingo.odata.test1.ETBaseTwoKeyNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTETTwoKeyNavParam") - .isFunction("UFCRTETTwoKeyNavParam") - .isParameter(0, "ParameterInt16", "1") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTETTwoKeyNavParam") + .isFunction("UFCRTETTwoKeyNavParam") + .isParameter(0, "ParameterInt16", "1") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilterOnEntry(EntityTypeProvider.nameETBaseTwoKeyNav); testUri.run("FICRTETTwoKeyNavParam(ParameterInt16=1)(PropertyInt16=2,PropertyString='3')" + "/olingo.odata.test1.ETBaseTwoKeyNav") @@ -1785,43 +1785,43 @@ public class TestFullResourcePath { public void runFunctionImpEs() throws Exception { /**/ testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTESMixPrimCollCompTwoParam") - .isFunction("UFCRTESMixPrimCollCompTwoParam") - .isParameter(0, "ParameterInt16", "1") - .isParameter(1, "ParameterString", "'2'") - .isType(EntityTypeProvider.nameETMixPrimCollComp); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTESMixPrimCollCompTwoParam") + .isFunction("UFCRTESMixPrimCollCompTwoParam") + .isParameter(0, "ParameterInt16", "1") + .isParameter(1, "ParameterString", "'2'") + .isType(EntityTypeProvider.nameETMixPrimCollComp); testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTESMixPrimCollCompTwoParam") - .isFunction("UFCRTESMixPrimCollCompTwoParam") - .isParameter(0, "ParameterInt16", "1") - .isParameter(1, "ParameterString", "'2'") - .isType(EntityTypeProvider.nameETMixPrimCollComp); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTESMixPrimCollCompTwoParam") + .isFunction("UFCRTESMixPrimCollCompTwoParam") + .isParameter(0, "ParameterInt16", "1") + .isParameter(1, "ParameterString", "'2'") + .isType(EntityTypeProvider.nameETMixPrimCollComp); testUri.run("FICRTESMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='2')/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTESMixPrimCollCompTwoParam") - .isFunction("UFCRTESMixPrimCollCompTwoParam") - .isParameter(0, "ParameterInt16", "1") - .isParameter(1, "ParameterString", "'2'") - .isType(EntityTypeProvider.nameETMixPrimCollComp) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTESMixPrimCollCompTwoParam") + .isFunction("UFCRTESMixPrimCollCompTwoParam") + .isParameter(0, "ParameterInt16", "1") + .isParameter(1, "ParameterString", "'2'") + .isType(EntityTypeProvider.nameETMixPrimCollComp) + .n() + .isCount(); } @Test public void runFunctionImpError() { testUri.runEx("FICRTCollCTTwoPrimParam") - .isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX); + .isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX); testUri.runEx("FICRTCollCTTwoPrimParam()") - .isExSemantic(UriParserSemanticException.MessageKeys.FUNCTION_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.FUNCTION_NOT_FOUND); testUri.runEx("FICRTCollCTTwoPrimParam(invalidParam=2)") - .isExSemantic(UriParserSemanticException.MessageKeys.FUNCTION_NOT_FOUND); + .isExSemantic(UriParserSemanticException.MessageKeys.FUNCTION_NOT_FOUND); } @Test @@ -1836,24 +1836,24 @@ public class TestFullResourcePath { public void runFunctionImpEsCast() throws Exception { testUri.run("FICRTCollESTwoKeyNavParam(ParameterInt16=1)/olingo.odata.test1.ETBaseTwoKeyNav") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTCollESTwoKeyNavParam") - .isFunction("UFCRTCollETTwoKeyNavParam") - .isParameter(0, "ParameterInt16", "1") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTCollESTwoKeyNavParam") + .isFunction("UFCRTCollETTwoKeyNavParam") + .isParameter(0, "ParameterInt16", "1") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav); testUri.run("FICRTCollESTwoKeyNavParam(ParameterInt16=1)/olingo.odata.test1.ETBaseTwoKeyNav/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isFunctionImport("FICRTCollESTwoKeyNavParam") - .isFunction("UFCRTCollETTwoKeyNavParam") - .isParameter(0, "ParameterInt16", "1") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isFunctionImport("FICRTCollESTwoKeyNavParam") + .isFunction("UFCRTCollETTwoKeyNavParam") + .isParameter(0, "ParameterInt16", "1") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilterOnCollection(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isCount(); testUri.run("FICRTCollESTwoKeyNavParam(ParameterInt16=1)" + "/olingo.odata.test1.ETBaseTwoKeyNav(PropertyInt16=2,PropertyString='3')") @@ -1886,477 +1886,477 @@ public class TestFullResourcePath { @Test public void runSingletonEntityValue() throws Exception { testUri.run("SIMedia/$value") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SIMedia") - .n().isValue(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SIMedia") + .n().isValue(); } @Test public void runSingletonPpNpCast() throws Exception { testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/NavPropertyETKeyNavMany") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, true); testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/NavPropertyETKeyNavMany(1)") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "1"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "1"); } @Test public void runSingletonPpCpCast() throws Exception { testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isComplex("PropertyComp"); testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/PropertyComp/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isComplex("PropertyComp") - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isComplex("PropertyComp") + .n() + .isComplex("PropertyComp"); testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/PropertyCompTwoPrim/olingo.odata.test1.CTBase") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isComplex("PropertyCompTwoPrim") - .isType(ComplexTypeProvider.nameCTTwoPrim) - .isTypeFilter(ComplexTypeProvider.nameCTBase); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isComplex("PropertyCompTwoPrim") + .isType(ComplexTypeProvider.nameCTTwoPrim) + .isTypeFilter(ComplexTypeProvider.nameCTBase); } @Test public void runSingletonPpSpCast() throws Exception { testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/PropertyInt16") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isPrimitiveProperty("PropertyInt16", PropertyProvider.nameInt16, false); testUri.run("SINav/olingo.odata.test1.ETBaseTwoKeyNav/CollPropertyString") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .isType(EntityTypeProvider.nameETTwoKeyNav) - .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) - .isType(PropertyProvider.nameString, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .isType(EntityTypeProvider.nameETTwoKeyNav) + .isTypeFilter(EntityTypeProvider.nameETBaseTwoKeyNav) + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) + .isType(PropertyProvider.nameString, true); } @Test public void runSingletonEntityPpNp() throws Exception { testUri.run("SINav/NavPropertyETKeyNavMany") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isNavProperty("NavPropertyETKeyNavMany", EntityTypeProvider.nameETKeyNav, true); testUri.run("SINav/NavPropertyETTwoKeyNavMany(PropertyInt16=1,PropertyString='2')") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) - .isKeyPredicate(0, "PropertyInt16", "1") - .isKeyPredicate(1, "PropertyString", "'2'"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isNavProperty("NavPropertyETTwoKeyNavMany", EntityTypeProvider.nameETTwoKeyNav, false) + .isKeyPredicate(0, "PropertyInt16", "1") + .isKeyPredicate(1, "PropertyString", "'2'"); } @Test public void runSingletonEntityPpCp() throws Exception { testUri.run("SINav/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isComplex("PropertyComp"); testUri.run("SINav/PropertyComp/PropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isComplex("PropertyComp") - .n() - .isComplex("PropertyComp"); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isComplex("PropertyComp") + .n() + .isComplex("PropertyComp"); } @Test public void runSingletonEntityPpCpColl() throws Exception { testUri.run("SINav/CollPropertyComp") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTPrimComp, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTPrimComp, true); testUri.run("SINav/CollPropertyComp/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isComplex("CollPropertyComp") - .isType(ComplexTypeProvider.nameCTPrimComp, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isComplex("CollPropertyComp") + .isType(ComplexTypeProvider.nameCTPrimComp, true) + .n() + .isCount(); } @Test public void runSingletonEntityPpSp() throws Exception { testUri.run("SINav/PropertyString") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false); } @Test public void runSingletonEntityPpSpColl() throws Exception { testUri.run("SINav/CollPropertyString") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true); testUri.run("SINav/CollPropertyString/$count") - .isKind(UriInfoKind.resource).goPath() - .first() - .isSingleton("SINav") - .n() - .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) - .n() - .isCount(); + .isKind(UriInfoKind.resource).goPath() + .first() + .isSingleton("SINav") + .n() + .isPrimitiveProperty("CollPropertyString", PropertyProvider.nameString, true) + .n() + .isCount();
<TRUNCATED>
