aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-09-22 17:04:50 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-09-22 17:04:50 +0200
commit297b712e37a889b824f5b1ef241379d67d045ecd (patch)
tree669039e7bcdfbba22a62129ab3c542bd7e350271 /config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java
parent82730b650885f5a1f366980ff7cdf900aa0844ff (diff)
Use OptionalInt
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java')
-rw-r--r--config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java
index 06ea202b9c3..551542a84ba 100644
--- a/config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/processing/NGramTestCase.java
@@ -27,15 +27,15 @@ public class NGramTestCase extends AbstractSchemaTestCase {
SDField gram1 = schema.getConcreteField("gram_1");
assertEquals(MatchType.GRAM, gram1.getMatching().getType());
- assertEquals(1, gram1.getMatching().getGramSize());
+ assertEquals(1, gram1.getMatching().getGramSize().getAsInt());
SDField gram2 = schema.getConcreteField("gram_2");
assertEquals(MatchType.GRAM, gram2.getMatching().getType());
- assertEquals(-1, gram2.getMatching().getGramSize()); // Not set explicitly
+ assertTrue(gram2.getMatching().getGramSize().isEmpty());
SDField gram3 = schema.getConcreteField("gram_3");
assertEquals(MatchType.GRAM, gram3.getMatching().getType());
- assertEquals(3, gram3.getMatching().getGramSize());
+ assertEquals(3, gram3.getMatching().getGramSize().getAsInt());
assertEquals("input gram_1 | ngram 1 | index gram_1 | summary gram_1", gram1.getIndexingScript().iterator().next().toString());
assertEquals("input gram_2 | ngram 2 | attribute gram_2 | index gram_2", gram2.getIndexingScript().iterator().next().toString());