summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo/net/UriToolsTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/net/UriToolsTestCase.java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/net/UriToolsTestCase.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/net/UriToolsTestCase.java b/vespajlib/src/test/java/com/yahoo/net/UriToolsTestCase.java
new file mode 100644
index 00000000000..9a17fa341be
--- /dev/null
+++ b/vespajlib/src/test/java/com/yahoo/net/UriToolsTestCase.java
@@ -0,0 +1,25 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.net;
+
+import static org.junit.Assert.*;
+
+import java.net.URISyntaxException;
+
+import org.junit.Test;
+
+/**
+ * Check validity of the URI helper methods.
+ *
+ * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
+ */
+public class UriToolsTestCase {
+
+ private static final String SEARCH_QUERY = "/search/?query=sddocname:music#trick";
+
+ @Test
+ public final void testRawRequest() throws URISyntaxException {
+ java.net.URI uri = new java.net.URI("http://localhost:" + 8080 + SEARCH_QUERY);
+ assertEquals(SEARCH_QUERY, UriTools.rawRequest(uri));
+ }
+
+}