[OLINGO-530] Change name of method to EntityCollection
This commit is contained in:
parent
2ac6ba18bb
commit
8ae469681c
|
@ -28,6 +28,6 @@ public interface ODataDeserializer {
|
|||
|
||||
Entity entity(InputStream stream, EdmEntityType edmEntityType) throws DeserializerException;
|
||||
|
||||
EntitySet entitySet(InputStream stream, EdmEntityType edmEntityType) throws DeserializerException;
|
||||
EntitySet entityCollection(InputStream stream, EdmEntityType edmEntityType) throws DeserializerException;
|
||||
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|||
public class ODataJsonDeserializer implements ODataDeserializer {
|
||||
|
||||
@Override
|
||||
public EntitySet entitySet(InputStream stream, EdmEntityType edmEntityType) throws DeserializerException {
|
||||
public EntitySet entityCollection(InputStream stream, EdmEntityType edmEntityType) throws DeserializerException {
|
||||
try {
|
||||
JsonParser parser = new JsonFactory(new ObjectMapper()).createParser(stream);
|
||||
final ObjectNode tree = parser.getCodec().readTree(parser);
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ODataDeserializerEntitySetTest extends AbstractODataDeserializerTes
|
|||
public void esAllPrim() throws Exception {
|
||||
EdmEntityType edmEntityType = edm.getEntityType(new FullQualifiedName("Namespace1_Alias", "ETAllPrim"));
|
||||
InputStream stream = getFileAsStream("ESAllPrim.json");
|
||||
EntitySet entitySet = OData.newInstance().createDeserializer(ODataFormat.JSON).entitySet(stream, edmEntityType);
|
||||
EntitySet entitySet = OData.newInstance().createDeserializer(ODataFormat.JSON).entityCollection(stream, edmEntityType);
|
||||
|
||||
assertNotNull(entitySet);
|
||||
assertEquals(3, entitySet.getEntities().size());
|
||||
|
@ -73,7 +73,7 @@ public class ODataDeserializerEntitySetTest extends AbstractODataDeserializerTes
|
|||
public void eSCompCollComp() throws Exception {
|
||||
EdmEntityType edmEntityType = edm.getEntityType(new FullQualifiedName("Namespace1_Alias", "ETCompCollComp"));
|
||||
InputStream stream = getFileAsStream("ESCompCollComp.json");
|
||||
EntitySet entitySet = OData.newInstance().createDeserializer(ODataFormat.JSON).entitySet(stream, edmEntityType);
|
||||
EntitySet entitySet = OData.newInstance().createDeserializer(ODataFormat.JSON).entityCollection(stream, edmEntityType);
|
||||
|
||||
assertNotNull(entitySet);
|
||||
assertEquals(2, entitySet.getEntities().size());
|
||||
|
|
Loading…
Reference in New Issue