Search in sources :

Example 1 with EdmEntitySetInfo

use of org.apache.olingo.odata2.api.edm.EdmEntitySetInfo in project camel by apache.

the class Olingo2AppAPITest method testServiceDocument.

@Test
public void testServiceDocument() throws Exception {
    final TestOlingo2ResponseHandler<ServiceDocument> responseHandler = new TestOlingo2ResponseHandler<ServiceDocument>();
    olingoApp.read(null, "", null, responseHandler);
    final ServiceDocument serviceDocument = responseHandler.await();
    final List<Collection> collections = serviceDocument.getAtomInfo().getWorkspaces().get(0).getCollections();
    assertEquals("Service Atom Collections", 3, collections.size());
    LOG.info("Service Atom Collections:  {}", collections);
    final List<EdmEntitySetInfo> entitySetsInfo = serviceDocument.getEntitySetsInfo();
    assertEquals("Service Entity Sets", 3, entitySetsInfo.size());
    LOG.info("Service Document Entries:  {}", entitySetsInfo);
}
Also used : Collection(org.apache.olingo.odata2.api.servicedocument.Collection) ServiceDocument(org.apache.olingo.odata2.api.servicedocument.ServiceDocument) EdmEntitySetInfo(org.apache.olingo.odata2.api.edm.EdmEntitySetInfo) Test(org.junit.Test)

Aggregations

EdmEntitySetInfo (org.apache.olingo.odata2.api.edm.EdmEntitySetInfo)1 Collection (org.apache.olingo.odata2.api.servicedocument.Collection)1 ServiceDocument (org.apache.olingo.odata2.api.servicedocument.ServiceDocument)1 Test (org.junit.Test)1