[OLINGO-530] Refactor Edm TechScenario Names again
This commit is contained in:
parent
6c894d7b66
commit
5a95029d70
|
@ -74,7 +74,7 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
|
||||||
final List<TypeDefinition> providerTypeDefinitions = schema.getTypeDefinitions();
|
final List<TypeDefinition> providerTypeDefinitions = schema.getTypeDefinitions();
|
||||||
if (providerTypeDefinitions != null) {
|
if (providerTypeDefinitions != null) {
|
||||||
for (TypeDefinition def : providerTypeDefinitions) {
|
for (TypeDefinition def : providerTypeDefinitions) {
|
||||||
typeDefinitions.add(new EdmTypeDefinitionImpl(edm, new FullQualifiedName("namespace", def.getName()), def));
|
typeDefinitions.add(new EdmTypeDefinitionImpl(edm, new FullQualifiedName(namespace, def.getName()), def));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return typeDefinitions;
|
return typeDefinitions;
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class EdmSchemaImplTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void basicGetters() {
|
public void basicGetters() {
|
||||||
assertEquals("namespace", schema.getNamespace());
|
assertEquals("org.namespace", schema.getNamespace());
|
||||||
assertEquals("alias", schema.getAlias());
|
assertEquals("alias", schema.getAlias());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public class EdmSchemaImplTest {
|
||||||
assertEquals(2, typeDefinitions.size());
|
assertEquals(2, typeDefinitions.size());
|
||||||
|
|
||||||
for (EdmTypeDefinition def : typeDefinitions) {
|
for (EdmTypeDefinition def : typeDefinitions) {
|
||||||
assertTrue(def == edm.getTypeDefinition(new FullQualifiedName("namespace", def.getName())));
|
assertTrue(def == edm.getTypeDefinition(new FullQualifiedName("org.namespace", def.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ public class EdmSchemaImplTest {
|
||||||
assertEquals(2, enumTypes.size());
|
assertEquals(2, enumTypes.size());
|
||||||
|
|
||||||
for (EdmEnumType enumType : enumTypes) {
|
for (EdmEnumType enumType : enumTypes) {
|
||||||
assertTrue(enumType == edm.getEnumType(new FullQualifiedName("namespace", enumType.getName())));
|
assertTrue(enumType == edm.getEnumType(new FullQualifiedName("org.namespace", enumType.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ public class EdmSchemaImplTest {
|
||||||
assertEquals(2, entityTypes.size());
|
assertEquals(2, entityTypes.size());
|
||||||
|
|
||||||
for (EdmEntityType entityType : entityTypes) {
|
for (EdmEntityType entityType : entityTypes) {
|
||||||
assertTrue(entityType == edm.getEntityType(new FullQualifiedName("namespace", entityType.getName())));
|
assertTrue(entityType == edm.getEntityType(new FullQualifiedName("org.namespace", entityType.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ public class EdmSchemaImplTest {
|
||||||
assertEquals(2, complexTypes.size());
|
assertEquals(2, complexTypes.size());
|
||||||
|
|
||||||
for (EdmComplexType complexType : complexTypes) {
|
for (EdmComplexType complexType : complexTypes) {
|
||||||
assertTrue(complexType == edm.getComplexType(new FullQualifiedName("namespace", complexType.getName())));
|
assertTrue(complexType == edm.getComplexType(new FullQualifiedName("org.namespace", complexType.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ public class EdmSchemaImplTest {
|
||||||
assertEquals(2, actions.size());
|
assertEquals(2, actions.size());
|
||||||
|
|
||||||
for (EdmAction action : actions) {
|
for (EdmAction action : actions) {
|
||||||
assertTrue(action == edm.getUnboundAction(new FullQualifiedName("namespace", action.getName())));
|
assertTrue(action == edm.getUnboundAction(new FullQualifiedName("org.namespace", action.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ public class EdmSchemaImplTest {
|
||||||
assertEquals(2, functions.size());
|
assertEquals(2, functions.size());
|
||||||
|
|
||||||
for (EdmFunction function : functions) {
|
for (EdmFunction function : functions) {
|
||||||
FullQualifiedName functionName = new FullQualifiedName("namespace", function.getName());
|
FullQualifiedName functionName = new FullQualifiedName("org.namespace", function.getName());
|
||||||
assertTrue(function == edm.getUnboundFunction(functionName, null));
|
assertTrue(function == edm.getUnboundFunction(functionName, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,6 +204,9 @@ public class EdmSchemaImplTest {
|
||||||
|
|
||||||
private class LocalProvider extends EdmProvider {
|
private class LocalProvider extends EdmProvider {
|
||||||
|
|
||||||
|
private static final String ALIAS = "alias";
|
||||||
|
private static final String NAMESPACE = "org.namespace";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
|
public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
|
||||||
throw new RuntimeException("Provider must not be called in the schema case");
|
throw new RuntimeException("Provider must not be called in the schema case");
|
||||||
|
@ -277,36 +280,36 @@ public class EdmSchemaImplTest {
|
||||||
@Override
|
@Override
|
||||||
public List<Schema> getSchemas() throws ODataException {
|
public List<Schema> getSchemas() throws ODataException {
|
||||||
Schema providerSchema = new Schema();
|
Schema providerSchema = new Schema();
|
||||||
providerSchema.setNamespace("namespace");
|
providerSchema.setNamespace(NAMESPACE);
|
||||||
providerSchema.setAlias("alias");
|
providerSchema.setAlias(ALIAS);
|
||||||
EntityContainer container = new EntityContainer().setName("container");
|
EntityContainer container = new EntityContainer().setName("container");
|
||||||
|
|
||||||
List<EntitySet> entitySets = new ArrayList<EntitySet>();
|
List<EntitySet> entitySets = new ArrayList<EntitySet>();
|
||||||
entitySets.add(new EntitySet().setName("entitySetName")
|
entitySets.add(new EntitySet().setName("entitySetName")
|
||||||
.setType(new FullQualifiedName("namespace", "entityType1")));
|
.setType(new FullQualifiedName(NAMESPACE, "entityType1")));
|
||||||
entitySets
|
entitySets
|
||||||
.add(new EntitySet().setName("entitySetName2").setType(new FullQualifiedName("namespace", "entityType2")));
|
.add(new EntitySet().setName("entitySetName2").setType(new FullQualifiedName(NAMESPACE, "entityType2")));
|
||||||
container.setEntitySets(entitySets);
|
container.setEntitySets(entitySets);
|
||||||
|
|
||||||
List<Singleton> singletons = new ArrayList<Singleton>();
|
List<Singleton> singletons = new ArrayList<Singleton>();
|
||||||
singletons.add(new Singleton().setName("singletonName")
|
singletons.add(new Singleton().setName("singletonName")
|
||||||
.setType(new FullQualifiedName("namespace", "entityType1")));
|
.setType(new FullQualifiedName(NAMESPACE, "entityType1")));
|
||||||
singletons
|
singletons
|
||||||
.add(new Singleton().setName("singletonName2").setType(new FullQualifiedName("namespace", "entityType2")));
|
.add(new Singleton().setName("singletonName2").setType(new FullQualifiedName(NAMESPACE, "entityType2")));
|
||||||
container.setSingletons(singletons);
|
container.setSingletons(singletons);
|
||||||
|
|
||||||
List<ActionImport> actionImports = new ArrayList<ActionImport>();
|
List<ActionImport> actionImports = new ArrayList<ActionImport>();
|
||||||
actionImports.add(new ActionImport().setName("actionImportName").setAction(
|
actionImports.add(new ActionImport().setName("actionImportName").setAction(
|
||||||
new FullQualifiedName("namespace", "action1")));
|
new FullQualifiedName(NAMESPACE, "action1")));
|
||||||
actionImports.add(new ActionImport().setName("actionImportName2").setAction(
|
actionImports.add(new ActionImport().setName("actionImportName2").setAction(
|
||||||
new FullQualifiedName("namespace", "action2")));
|
new FullQualifiedName(NAMESPACE, "action2")));
|
||||||
container.setActionImports(actionImports);
|
container.setActionImports(actionImports);
|
||||||
|
|
||||||
List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
|
List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
|
||||||
functionImports.add(new FunctionImport().setName("functionImportName").setFunction(
|
functionImports.add(new FunctionImport().setName("functionImportName").setFunction(
|
||||||
new FullQualifiedName("namespace", "function1")));
|
new FullQualifiedName(NAMESPACE, "function1")));
|
||||||
functionImports.add(new FunctionImport().setName("functionImportName2").setFunction(
|
functionImports.add(new FunctionImport().setName("functionImportName2").setFunction(
|
||||||
new FullQualifiedName("namespace", "function2")));
|
new FullQualifiedName(NAMESPACE, "function2")));
|
||||||
container.setFunctionImports(functionImports);
|
container.setFunctionImports(functionImports);
|
||||||
providerSchema.setEntityContainer(container);
|
providerSchema.setEntityContainer(container);
|
||||||
|
|
||||||
|
@ -323,13 +326,13 @@ public class EdmSchemaImplTest {
|
||||||
List<EntityType> entityTypes = new ArrayList<EntityType>();
|
List<EntityType> entityTypes = new ArrayList<EntityType>();
|
||||||
entityTypes.add(new EntityType().setName("entityType1"));
|
entityTypes.add(new EntityType().setName("entityType1"));
|
||||||
entityTypes.add(new EntityType().setName("entityType2")
|
entityTypes.add(new EntityType().setName("entityType2")
|
||||||
.setBaseType(new FullQualifiedName("namespace", "entityType1")));
|
.setBaseType(new FullQualifiedName(NAMESPACE, "entityType1")));
|
||||||
providerSchema.setEntityTypes(entityTypes);
|
providerSchema.setEntityTypes(entityTypes);
|
||||||
|
|
||||||
List<ComplexType> complexTypes = new ArrayList<ComplexType>();
|
List<ComplexType> complexTypes = new ArrayList<ComplexType>();
|
||||||
complexTypes.add(new ComplexType().setName("complexType1"));
|
complexTypes.add(new ComplexType().setName("complexType1"));
|
||||||
complexTypes.add(new ComplexType().setName("complexType2").setBaseType(
|
complexTypes.add(new ComplexType().setName("complexType2").setBaseType(
|
||||||
new FullQualifiedName("namespace", "complexType1")));
|
new FullQualifiedName(NAMESPACE, "complexType1")));
|
||||||
providerSchema.setComplexTypes(complexTypes);
|
providerSchema.setComplexTypes(complexTypes);
|
||||||
|
|
||||||
List<Action> actions = new ArrayList<Action>();
|
List<Action> actions = new ArrayList<Action>();
|
||||||
|
|
|
@ -49,8 +49,8 @@ public class ComplexTypeProvider {
|
||||||
public static final FullQualifiedName nameCTTwoBasePrimCompNav =
|
public static final FullQualifiedName nameCTTwoBasePrimCompNav =
|
||||||
new FullQualifiedName(SchemaProvider.NAMESPACE, "CTTwoBasePrimCompNav");
|
new FullQualifiedName(SchemaProvider.NAMESPACE, "CTTwoBasePrimCompNav");
|
||||||
public static final FullQualifiedName nameCTTwoPrim = new FullQualifiedName(SchemaProvider.NAMESPACE, "CTTwoPrim");
|
public static final FullQualifiedName nameCTTwoPrim = new FullQualifiedName(SchemaProvider.NAMESPACE, "CTTwoPrim");
|
||||||
public static final FullQualifiedName nameCTMixEnumDefColl = new FullQualifiedName(SchemaProvider.NAMESPACE,
|
public static final FullQualifiedName nameCTMixEnumDef = new FullQualifiedName(SchemaProvider.NAMESPACE,
|
||||||
"CTMixEnumDefColl");
|
"CTMixEnumDef");
|
||||||
|
|
||||||
public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
|
public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
|
||||||
|
|
||||||
|
@ -163,9 +163,9 @@ public class ComplexTypeProvider {
|
||||||
.setName("CTTwoBasePrimCompNav")
|
.setName("CTTwoBasePrimCompNav")
|
||||||
.setBaseType(nameCTBasePrimCompNav);
|
.setBaseType(nameCTBasePrimCompNav);
|
||||||
|
|
||||||
} else if (complexTypeName.equals(nameCTMixEnumDefColl)) {
|
} else if (complexTypeName.equals(nameCTMixEnumDef)) {
|
||||||
return new ComplexType()
|
return new ComplexType()
|
||||||
.setName(nameCTMixEnumDefColl.getName())
|
.setName(nameCTMixEnumDef.getName())
|
||||||
.setProperties(Arrays.asList(
|
.setProperties(Arrays.asList(
|
||||||
PropertyProvider.propertyEnumString_ENString,
|
PropertyProvider.propertyEnumString_ENString,
|
||||||
PropertyProvider.collPropertyEnumString_ENString,
|
PropertyProvider.collPropertyEnumString_ENString,
|
||||||
|
|
|
@ -517,12 +517,12 @@ public class PropertyProvider {
|
||||||
.setType(ComplexTypeProvider.nameCTMixPrimCollComp);
|
.setType(ComplexTypeProvider.nameCTMixPrimCollComp);
|
||||||
|
|
||||||
public static final Property propertyComp_CTMixEnumTypeDefColl = new Property()
|
public static final Property propertyComp_CTMixEnumTypeDefColl = new Property()
|
||||||
.setName("PropertyCompMixedEnumTypeDefColl")
|
.setName("PropertyCompMixedEnumDef")
|
||||||
.setType(ComplexTypeProvider.nameCTMixEnumDefColl);
|
.setType(ComplexTypeProvider.nameCTMixEnumDef);
|
||||||
|
|
||||||
public static final Property propertyCompColl_CTMixEnumTypeDefColl = new Property()
|
public static final Property propertyCompColl_CTMixEnumTypeDefColl = new Property()
|
||||||
.setName("CollPropertyCompMixedEnumDefColl")
|
.setName("CollPropertyCompMixedEnumDef")
|
||||||
.setType(ComplexTypeProvider.nameCTMixEnumDefColl)
|
.setType(ComplexTypeProvider.nameCTMixEnumDef)
|
||||||
.setCollection(true);
|
.setCollection(true);
|
||||||
|
|
||||||
// Navigation Properties -------------------------------------------------------------------------------------------
|
// Navigation Properties -------------------------------------------------------------------------------------------
|
||||||
|
@ -600,10 +600,12 @@ public class PropertyProvider {
|
||||||
// TypeDefinition Properties ---------------------------------------------------------------------------------------
|
// TypeDefinition Properties ---------------------------------------------------------------------------------------
|
||||||
public static final Property propertyTypeDefinition_TDString = new Property()
|
public static final Property propertyTypeDefinition_TDString = new Property()
|
||||||
.setName("PropertyDefString")
|
.setName("PropertyDefString")
|
||||||
.setType(TypeDefinitionProvider.nameTDString);
|
.setType(TypeDefinitionProvider.nameTDString)
|
||||||
|
.setMaxLength(15);
|
||||||
|
|
||||||
public static final Property collPropertyTypeDefinition_TDString = new Property()
|
public static final Property collPropertyTypeDefinition_TDString = new Property()
|
||||||
.setName("CollPropertyDefString")
|
.setName("CollPropertyDefString")
|
||||||
.setType(TypeDefinitionProvider.nameTDString)
|
.setType(TypeDefinitionProvider.nameTDString)
|
||||||
|
.setMaxLength(15)
|
||||||
.setCollection(true);
|
.setCollection(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class SchemaProvider {
|
||||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTBasePrimCompNav));
|
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTBasePrimCompNav));
|
||||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoBasePrimCompNav));
|
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoBasePrimCompNav));
|
||||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompNav));
|
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompNav));
|
||||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixEnumDefColl));
|
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixEnumDef));
|
||||||
|
|
||||||
// TypeDefinitions
|
// TypeDefinitions
|
||||||
List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>();
|
List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>();
|
||||||
|
|
|
@ -434,7 +434,7 @@ public class ODataJsonDeserializerEntityTest extends AbstractODataDeserializerTe
|
||||||
assertNotNull(defProperty);
|
assertNotNull(defProperty);
|
||||||
assertEquals("string", defProperty.getValue());
|
assertEquals("string", defProperty.getValue());
|
||||||
|
|
||||||
Property complexProperty = entity.getProperty("PropertyCompMixedEnumTypeDefColl");
|
Property complexProperty = entity.getProperty("PropertyCompMixedEnumDef");
|
||||||
List<Property> value = (List<Property>) complexProperty.getValue();
|
List<Property> value = (List<Property>) complexProperty.getValue();
|
||||||
assertEquals((short) 2, value.get(0).getValue());
|
assertEquals((short) 2, value.get(0).getValue());
|
||||||
}
|
}
|
||||||
|
@ -1099,7 +1099,7 @@ public class ODataJsonDeserializerEntityTest extends AbstractODataDeserializerTe
|
||||||
public void eTMixEnumDefCollCompNavInvalidComplexEnumValueNull() throws Exception {
|
public void eTMixEnumDefCollCompNavInvalidComplexEnumValueNull() throws Exception {
|
||||||
String entityString = "{"
|
String entityString = "{"
|
||||||
+ "\"PropertyEnumString\" : 2,"
|
+ "\"PropertyEnumString\" : 2,"
|
||||||
+ "\"PropertyCompMixedEnumTypeDefColl\" : {"
|
+ "\"PropertyCompMixedEnumDef\" : {"
|
||||||
+ "\"PropertyEnumString\" : null"
|
+ "\"PropertyEnumString\" : null"
|
||||||
+ "}}";
|
+ "}}";
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,12 @@ public class MetadataDocumentTest {
|
||||||
assertThat(metadata, containsString("<EntityType Name=\"ETAbstract\" Abstract=\"true\">"));
|
assertThat(metadata, containsString("<EntityType Name=\"ETAbstract\" Abstract=\"true\">"));
|
||||||
assertThat(metadata,
|
assertThat(metadata,
|
||||||
containsString("<EntityType Name=\"ETAbstractBase\" BaseType=\"Namespace1_Alias.ETAbstract\">"));
|
containsString("<EntityType Name=\"ETAbstractBase\" BaseType=\"Namespace1_Alias.ETAbstract\">"));
|
||||||
|
|
||||||
|
// TypeDefCheck
|
||||||
|
assertThat(metadata,
|
||||||
|
containsString("<Property Name=\"PropertyDefString\" Type=\"Namespace1_Alias.TDString\" MaxLength=\"15\"/>"));
|
||||||
|
assertThat(metadata, containsString("<Property Name=\"CollPropertyDefString\" " +
|
||||||
|
"Type=\"Collection(Namespace1_Alias.TDString)\" MaxLength=\"15\"/>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4460,11 +4460,11 @@ public class TestFullResourcePath {
|
||||||
.root().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String1"));
|
.root().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String1"));
|
||||||
|
|
||||||
testFilter.runOnETMixEnumDefCollComp(
|
testFilter.runOnETMixEnumDefCollComp(
|
||||||
"PropertyCompMixedEnumTypeDefColl/PropertyEnumString has olingo.odata.test1.ENString'String2'")
|
"PropertyCompMixedEnumDef/PropertyEnumString has olingo.odata.test1.ENString'String2'")
|
||||||
.is("<<PropertyCompMixedEnumTypeDefColl/PropertyEnumString> has <olingo.odata.test1.ENString<String2>>>")
|
.is("<<PropertyCompMixedEnumDef/PropertyEnumString> has <olingo.odata.test1.ENString<String2>>>")
|
||||||
.isBinary(BinaryOperatorKind.HAS)
|
.isBinary(BinaryOperatorKind.HAS)
|
||||||
.root().left().goPath()
|
.root().left().goPath()
|
||||||
.first().isComplex("PropertyCompMixedEnumTypeDefColl")
|
.first().isComplex("PropertyCompMixedEnumDef")
|
||||||
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString)
|
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString)
|
||||||
.isType(EnumTypeProvider.nameENString)
|
.isType(EnumTypeProvider.nameENString)
|
||||||
.goUpFilterValidator()
|
.goUpFilterValidator()
|
||||||
|
@ -4472,14 +4472,14 @@ public class TestFullResourcePath {
|
||||||
|
|
||||||
testFilter
|
testFilter
|
||||||
.runOnETMixEnumDefCollComp(
|
.runOnETMixEnumDefCollComp(
|
||||||
"PropertyCompMixedEnumTypeDefColl/PropertyEnumString has olingo.odata.test1.ENString'String2' eq true")
|
"PropertyCompMixedEnumDef/PropertyEnumString has olingo.odata.test1.ENString'String2' eq true")
|
||||||
.is("<<<PropertyCompMixedEnumTypeDefColl/PropertyEnumString> has " +
|
.is("<<<PropertyCompMixedEnumDef/PropertyEnumString> has " +
|
||||||
"<olingo.odata.test1.ENString<String2>>> eq <true>>")
|
"<olingo.odata.test1.ENString<String2>>> eq <true>>")
|
||||||
.isBinary(BinaryOperatorKind.EQ)
|
.isBinary(BinaryOperatorKind.EQ)
|
||||||
.root().left()
|
.root().left()
|
||||||
.isBinary(BinaryOperatorKind.HAS)
|
.isBinary(BinaryOperatorKind.HAS)
|
||||||
.root().left().left().goPath()
|
.root().left().left().goPath()
|
||||||
.first().isComplex("PropertyCompMixedEnumTypeDefColl")
|
.first().isComplex("PropertyCompMixedEnumDef")
|
||||||
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString)
|
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString)
|
||||||
.goUpFilterValidator()
|
.goUpFilterValidator()
|
||||||
.root().left().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String2"));
|
.root().left().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String2"));
|
||||||
|
@ -4734,26 +4734,26 @@ public class TestFullResourcePath {
|
||||||
.root().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String2"));
|
.root().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String2"));
|
||||||
|
|
||||||
testFilter.runOnETMixEnumDefCollComp(
|
testFilter.runOnETMixEnumDefCollComp(
|
||||||
"PropertyCompMixedEnumTypeDefColl/PropertyEnumString eq olingo.odata.test1.ENString'String3'")
|
"PropertyCompMixedEnumDef/PropertyEnumString eq olingo.odata.test1.ENString'String3'")
|
||||||
.is("<<PropertyCompMixedEnumTypeDefColl/PropertyEnumString> eq <olingo.odata.test1.ENString<String3>>>")
|
.is("<<PropertyCompMixedEnumDef/PropertyEnumString> eq <olingo.odata.test1.ENString<String3>>>")
|
||||||
.isBinary(BinaryOperatorKind.EQ)
|
.isBinary(BinaryOperatorKind.EQ)
|
||||||
.root().left().goPath()
|
.root().left().goPath()
|
||||||
.first().isComplex("PropertyCompMixedEnumTypeDefColl")
|
.first().isComplex("PropertyCompMixedEnumDef")
|
||||||
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString).goUpFilterValidator()
|
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString).goUpFilterValidator()
|
||||||
.root().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String3"));
|
.root().right().isEnum(EnumTypeProvider.nameENString, Arrays.asList("String3"));
|
||||||
|
|
||||||
testFilter
|
testFilter
|
||||||
.runOnETMixEnumDefCollComp(
|
.runOnETMixEnumDefCollComp(
|
||||||
"PropertyCompMixedEnumTypeDefColl/PropertyEnumString eq " +
|
"PropertyCompMixedEnumDef/PropertyEnumString eq " +
|
||||||
"PropertyCompMixedEnumTypeDefColl/PropertyEnumString")
|
"PropertyCompMixedEnumDef/PropertyEnumString")
|
||||||
.is("<<PropertyCompMixedEnumTypeDefColl/PropertyEnumString> eq " +
|
.is("<<PropertyCompMixedEnumDef/PropertyEnumString> eq " +
|
||||||
"<PropertyCompMixedEnumTypeDefColl/PropertyEnumString>>")
|
"<PropertyCompMixedEnumDef/PropertyEnumString>>")
|
||||||
.isBinary(BinaryOperatorKind.EQ)
|
.isBinary(BinaryOperatorKind.EQ)
|
||||||
.root().left().goPath()
|
.root().left().goPath()
|
||||||
.first().isComplex("PropertyCompMixedEnumTypeDefColl")
|
.first().isComplex("PropertyCompMixedEnumDef")
|
||||||
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString).goUpFilterValidator()
|
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString).goUpFilterValidator()
|
||||||
.root().right().goPath()
|
.root().right().goPath()
|
||||||
.first().isComplex("PropertyCompMixedEnumTypeDefColl")
|
.first().isComplex("PropertyCompMixedEnumDef")
|
||||||
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString).goUpFilterValidator();
|
.n().isComplex("PropertyEnumString").isType(EnumTypeProvider.nameENString).goUpFilterValidator();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
"PropertyDefString" : "string",
|
"PropertyDefString" : "string",
|
||||||
"CollPropertyEnumString" : [1, 2],
|
"CollPropertyEnumString" : [1, 2],
|
||||||
"CollPropertyDefString" : ["string1", "string2"],
|
"CollPropertyDefString" : ["string1", "string2"],
|
||||||
"PropertyCompMixedEnumTypeDefColl" : {
|
"PropertyCompMixedEnumDef" : {
|
||||||
"PropertyEnumString" : 2,
|
"PropertyEnumString" : 2,
|
||||||
"PropertyDefString" : "string",
|
"PropertyDefString" : "string",
|
||||||
"CollPropertyEnumString" : [1, 2],
|
"CollPropertyEnumString" : [1, 2],
|
||||||
"CollPropertyDefString" : ["string1", "string2"]
|
"CollPropertyDefString" : ["string1", "string2"]
|
||||||
},
|
},
|
||||||
"CollPropertyCompMixedEnumDefColl" : [{
|
"CollPropertyCompMixedEnumDef" : [{
|
||||||
"PropertyEnumString" : 2,
|
"PropertyEnumString" : 2,
|
||||||
"PropertyDefString" : "string",
|
"PropertyDefString" : "string",
|
||||||
"CollPropertyEnumString" : [1, 2],
|
"CollPropertyEnumString" : [1, 2],
|
||||||
|
|
Loading…
Reference in New Issue