Skip to content

Commit 5b99eb7

Browse files
committedJul 15, 2015
OLINGO-640: Adding support for ATOM+XML Serializer and De-Serializer
1 parent 9674aae commit 5b99eb7

File tree

72 files changed

+7093
-551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+7093
-551
lines changed
 

‎fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java

+122-52
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.apache.olingo.fit.tecsvc.client;
20+
21+
import static org.hamcrest.CoreMatchers.containsString;
22+
import static org.junit.Assert.assertThat;
23+
24+
import org.apache.olingo.client.api.EdmEnabledODataClient;
25+
import org.apache.olingo.client.api.ODataClient;
26+
import org.apache.olingo.client.core.ODataClientFactory;
27+
import org.apache.olingo.commons.api.format.ContentType;
28+
29+
public class BasicXmlITCase extends BasicITCase {
30+
31+
@Override
32+
protected ODataClient getClient() {
33+
ODataClient odata = ODataClientFactory.getClient();
34+
odata.getConfiguration().setDefaultPubFormat(ContentType.APPLICATION_ATOM_XML);
35+
return odata;
36+
}
37+
38+
protected void assertContentType(String content) {
39+
assertThat(content, containsString(ContentType.APPLICATION_ATOM_XML.toContentTypeString()));
40+
}
41+
42+
protected EdmEnabledODataClient getClient(String serviceURI) {
43+
return ODataClientFactory.getEdmEnabledClient(serviceURI, ContentType.APPLICATION_ATOM_XML);
44+
}
45+
}

0 commit comments

Comments
 (0)
Please sign in to comment.