Examples of EdmEntitySet


Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

   * @throws Exception
   */
  @Test
  public void readWithInlineContentEmployeeRoomEntry() throws Exception {

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees");
    InputStream reqContent = createContentAsStream(EMPLOYEE_1_ROOM_XML);

    // execute
    XmlEntityConsumer xec = new XmlEntityConsumer();
    ODataEntry employee =
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

   * Reads an inline Room at an Employee with specially formatted XML (see issue ODATAFORSAP-92).
   */
  @Test
  public void readWithInlineContentEmployeeRoomEntrySpecialXml() throws Exception {

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees");
    InputStream reqContent = createContentAsStream(EMPLOYEE_1_ROOM_XML, true);

    // execute
    XmlEntityConsumer xec = new XmlEntityConsumer();
    ODataEntry entry =
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

   * (which has {@link com.sap.core.odata.api.edm.EdmMultiplicity#ONE EdmMultiplicity#ONE}).
   */
  @Test
  public void readWithInlineContentEmployeeNullRoomEntry() throws Exception {

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees");
    InputStream reqContent = createContentAsStream(EMPLOYEE_1_NULL_ROOM_XML);

    // execute
    XmlEntityConsumer xec = new XmlEntityConsumer();
    ODataEntry entry =
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

   * (which has {@link com.sap.core.odata.api.edm.EdmMultiplicity#ONE EdmMultiplicity#ONE}).
   */
  @Test
  public void readWithInlineContentEmployeeNullRoomEntrySpecialXmlFormat() throws Exception {

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees");
    InputStream reqContent = createContentAsStream(EMPLOYEE_1_NULL_ROOM_XML, true);

    // execute
    XmlEntityConsumer xec = new XmlEntityConsumer();
    ODataEntry entry =
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

   * (which has {@link com.sap.core.odata.api.edm.EdmMultiplicity#MANY EdmMultiplicity#MANY}).
   */
  @Test
  public void readWithInlineContentRoomNullEmployeesEntry() throws Exception {

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Rooms");
    InputStream reqContent = createContentAsStream(ROOM_1_NULL_EMPLOYEE_XML);

    // execute
    XmlEntityConsumer xec = new XmlEntityConsumer();
    ODataEntry entry =
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

    String content = readFile("expanded_team.xml")
        .replace("<feed xml:base=\"http://some.host.com/service.root/\">", "")
        .replace("</feed>", "");
    assertNotNull(content);

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Teams");
    InputStream reqContent = createContentAsStream(content);

    // execute
    readAndExpectException(entitySet, reqContent,
        EntityProviderException.INVALID_INLINE_CONTENT.addContent("xml data"));
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

    // prepare
    String content = readFile("expanded_team.xml")
        .replace("type=\"application/atom+xml;type=feed\"", "");
    assertNotNull(content);

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Teams");
    InputStream reqContent = createContentAsStream(content);

    // execute
    readAndExpectException(entitySet, reqContent,
        EntityProviderException.INVALID_INLINE_CONTENT.addContent("xml data"));
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

    // prepare
    String content = readFile("expanded_team.xml")
        .replace("type=\"application/atom+xml;type=feed\"", "type=\"application/atom+xml;type=entry\"");
    assertNotNull(content);

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Teams");
    InputStream reqContent = createContentAsStream(content);

    // execute
    readAndExpectException(entitySet, reqContent, EntityProviderException.INVALID_INLINE_CONTENT.addContent("feed"));
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

    // prepare
    String content = readFile("double_expanded_team.xml")
        .replace("type=\"application/atom+xml;type=entry\"", "type=\"application/atom+xml;type=feed\"");
    assertNotNull(content);

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Teams");
    InputStream reqContent = createContentAsStream(content);

    // execute
    readAndExpectException(entitySet, reqContent, EntityProviderException.INVALID_INLINE_CONTENT.addContent("entry"));
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmEntitySet

            "xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" " +
            "xml:base=\"http://localhost:19000/test/\" m:etag=\"W/&quot;1&quot;\">"
            +
            "</entry>";

    EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Rooms");
    InputStream reqContent = createContentAsStream(roomWithValidNamespaces);
    readAndExpectException(entitySet, reqContent, EntityProviderException.UNSUPPORTED_CHARACTER_ENCODING
        .addContent("UTF-32"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.