aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-11-02 23:52:27 +0100
committerJon Bratseth <bratseth@gmail.com>2021-11-02 23:52:27 +0100
commit8a4f6dd177c3d27009c06a46a57fddd0d8ec86b7 (patch)
tree9a7b9ff1a9872bb65cb2c01ea78aa887296d829d /container-search/src/test
parent355b1d01147f0cc8d57118fb1f9278f2a09aaf9b (diff)
Disclose entries as pure items
Diffstat (limited to 'container-search/src/test')
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/query/test/WandItemTestCase.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/container-search/src/test/java/com/yahoo/prelude/query/test/WandItemTestCase.java b/container-search/src/test/java/com/yahoo/prelude/query/test/WandItemTestCase.java
index 8a8c4fe3ea7..49621c3ef8a 100644
--- a/container-search/src/test/java/com/yahoo/prelude/query/test/WandItemTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/query/test/WandItemTestCase.java
@@ -1,14 +1,13 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.query.test;
-import com.yahoo.io.HexDump;
+import com.yahoo.prelude.query.Item;
+import com.yahoo.prelude.query.PureWeightedString;
+import com.yahoo.prelude.query.WandItem;
import com.yahoo.prelude.query.textualrepresentation.Discloser;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import com.yahoo.prelude.query.*;
import java.nio.ByteBuffer;
import java.util.HashMap;
@@ -19,7 +18,7 @@ import java.util.Map;
*/
public class WandItemTestCase {
- private static double DELTA = 0.0000001;
+ private static final double DELTA = 0.0000001;
private static WandItem createSimpleItem() {
WandItem item = new WandItem("myfield", 10);
@@ -57,7 +56,7 @@ public class WandItemTestCase {
actual.flip();
expect.flip();
- assertTrue(actual.equals(expect));
+ assertEquals(expect, actual);
}
@Test
@@ -68,7 +67,7 @@ public class WandItemTestCase {
@Test
public void requireThatDiscloseIsWorking() {
class TestDiscloser implements Discloser {
- public Map<String, Object> props = new HashMap<>();
+ public final Map<String, Object> props = new HashMap<>();
public void addProperty(String key, Object value) {
props.put(key, value);
}
@@ -82,4 +81,5 @@ public class WandItemTestCase {
assertEquals(2.0, discloser.props.get("thresholdBoostFactor"));
assertEquals("myfield", discloser.props.get("index"));
}
+
}