summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorVegard Sjonfjell <vegardsjo@gmail.com>2016-10-05 16:15:12 +0200
committerGitHub <noreply@github.com>2016-10-05 16:15:12 +0200
commit988a165429ef19b388e684faa712ffd9096cc559 (patch)
treede22221e7f90ac2e3cdccc802acef6bb5bc4f082 /vespa-http-client
parent6b809b6c8399440475a852bd7fe50fd1671b7212 (diff)
parent64b6777b0306c013a3b38807615c9c57515bdeb5 (diff)
Merge pull request #795 from yahoo/voffeloff/constant-tensor-validation
Voffeloff/constant tensor validation
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/pom.xml6
-rw-r--r--vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java11
2 files changed, 7 insertions, 10 deletions
diff --git a/vespa-http-client/pom.xml b/vespa-http-client/pom.xml
index 9e2325e8016..563e4406fe9 100644
--- a/vespa-http-client/pom.xml
+++ b/vespa-http-client/pom.xml
@@ -83,6 +83,12 @@
<artifactId>airline</artifactId>
<version>0.6</version>
</dependency>
+ <dependency>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>testutil</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java
index ab7dca0d5fb..eba8791bbb7 100644
--- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java
+++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.http.client.runner;
-import com.google.common.base.Joiner;
import com.yahoo.vespa.http.client.FeedClient;
import com.yahoo.vespa.http.client.core.JsonReader;
import org.junit.Test;
@@ -13,6 +12,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
+import static com.yahoo.test.json.JsonTestHelper.inputJson;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
@@ -260,13 +260,4 @@ public class JsonReaderTest {
assertThat(session.documentIds.size(), is(1));
assertThat(session.documentIds.get(0), is("id:foo:music:doc:foo:bar"));
}
-
- /**
- * Convenience method to input JSON without escaping double quotes and newlines
- * Each parameter represents a line of JSON encoded data
- * The lines are joined with newline and single quotes are replaced with double quotes
- */
- static String inputJson(String... lines) {
- return Joiner.on("\n").join(lines).replaceAll("'", "\"");
- }
} \ No newline at end of file