Repository: olingo-odata4 Updated Branches: refs/heads/master ee60a793a -> 5f11f5b1d
[OLINGO-1004] Delete ServiceDocumentTestITCase Duplicated in org.apache.olingo.fit.tecsvc.client.BasicITCase Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/7d3cede1 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/7d3cede1 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/7d3cede1 Branch: refs/heads/master Commit: 7d3cede1c1be496cbec52b916dd2865c6f8f379f Parents: ee60a79 Author: Christian Amend <[email protected]> Authored: Fri Aug 12 10:58:37 2016 +0200 Committer: Christian Amend <[email protected]> Committed: Fri Aug 12 10:58:37 2016 +0200 ---------------------------------------------------------------------- .../fit/base/ServiceDocumentTestITCase.java | 63 -------------------- 1 file changed, 63 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/7d3cede1/fit/src/test/java/org/apache/olingo/fit/base/ServiceDocumentTestITCase.java ---------------------------------------------------------------------- diff --git a/fit/src/test/java/org/apache/olingo/fit/base/ServiceDocumentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/base/ServiceDocumentTestITCase.java deleted file mode 100644 index 10beb8b..0000000 --- a/fit/src/test/java/org/apache/olingo/fit/base/ServiceDocumentTestITCase.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * 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 - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.fit.base; - -import static org.junit.Assert.assertEquals; - -import java.net.URI; - -import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest; -import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; -import org.apache.olingo.client.api.domain.ClientServiceDocument; -import org.apache.olingo.commons.api.format.ContentType; -import org.junit.Test; - -public class ServiceDocumentTestITCase extends AbstractTestITCase { - - private void retrieveServiceDocument(final ContentType contentType) { - final ODataServiceDocumentRequest req = - client.getRetrieveRequestFactory().getServiceDocumentRequest(testStaticServiceRootURL); - req.setFormat(contentType); - - final ODataRetrieveResponse<ClientServiceDocument> res = req.execute(); - assertEquals(200, res.getStatusCode()); - - final ClientServiceDocument serviceDocument = res.getBody(); - assertEquals(12, serviceDocument.getEntitySets().size()); - assertEquals(6, serviceDocument.getSingletons().size()); - assertEquals(6, serviceDocument.getFunctionImports().size()); - - assertEquals(URI.create(testStaticServiceRootURL + "/ProductDetails"), - serviceDocument.getEntitySetURI("ProductDetails")); - assertEquals(URI.create(testStaticServiceRootURL + "/Boss"), - serviceDocument.getSingletonURI("Boss")); - assertEquals(URI.create(testStaticServiceRootURL + "/GetPerson"), - serviceDocument.getFunctionImportURI("GetPerson")); - } - - @Test - public void retrieveServiceDocumentAsXML() { - retrieveServiceDocument(ContentType.APPLICATION_XML); - } - - @Test - public void retrieveServiceDocumentAsJSON() { - retrieveServiceDocument(ContentType.JSON); - } -}
