Repository: olingo-odata4
Updated Branches:
  refs/heads/master f68aa54e1 -> 658ddef87


[OLINGO-313] more tests


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/658ddef8
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/658ddef8
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/658ddef8

Branch: refs/heads/master
Commit: 658ddef878c397a2f05b4debf703ca87f354360e
Parents: f68aa54
Author: Stephan Klevenz <[email protected]>
Authored: Tue Jun 3 16:46:51 2014 +0200
Committer: Stephan Klevenz <[email protected]>
Committed: Tue Jun 3 16:46:51 2014 +0200

----------------------------------------------------------------------
 .../olingo/server/api/ODataRequestTest.java     | 45 ++++++++++++++++++++
 1 file changed, 45 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/658ddef8/lib/server-test/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java
----------------------------------------------------------------------
diff --git 
a/lib/server-test/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java
 
b/lib/server-test/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java
new file mode 100644
index 0000000..f256798
--- /dev/null
+++ 
b/lib/server-test/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java
@@ -0,0 +1,45 @@
+/*
+ * 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.server.api;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+
+public class ODataRequestTest {
+  
+  @Test
+  public void testHeader() {
+    ODataRequest r = new ODataRequest();
+    
+    r.addHeader("aa", Arrays.asList("cc"));
+    
+    assertEquals("cc", r.getHeader("aa").get(0));
+    assertEquals("cc", r.getHeader("aA").get(0));
+    assertEquals("cc", r.getHeader("AA").get(0));
+    
+    r.addHeader("AA", Arrays.asList("dd"));
+    
+    assertEquals("dd", r.getHeader("aa").get(0));
+    assertEquals("dd", r.getHeader("aA").get(0));
+    assertEquals("dd", r.getHeader("AA").get(0));   
+  }
+}

Reply via email to