aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java
index 9f14a78d8c5..5efe75bdca5 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentSelectionConverterTest.java
@@ -3,10 +3,10 @@ package com.yahoo.vespa.model.search.test;
import com.yahoo.document.select.parser.ParseException;
import com.yahoo.vespa.model.search.DocumentSelectionConverter;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
/**
* Unit tests for RemoveSelection.
@@ -14,19 +14,20 @@ import static org.junit.Assert.assertTrue;
*/
public class DocumentSelectionConverterTest {
@Test
- public void testQueryConversion() throws ParseException, IllegalArgumentException, UnsupportedOperationException {
+ void testQueryConversion() throws ParseException, IllegalArgumentException, UnsupportedOperationException {
DocumentSelectionConverter converter = new DocumentSelectionConverter("music.expire>now() - 3600 and video.expire > now() - 300");
assertEquals("expire:>now(3600)", converter.getQuery("music"));
assertEquals("expire:<now(3600)", converter.getInvertedQuery("music"));
assertEquals("expire:>now(300)", converter.getQuery("video"));
assertEquals("expire:<now(300)", converter.getInvertedQuery("video"));
- assertTrue(null == converter.getQuery("book"));
- assertTrue(null == converter.getInvertedQuery("book"));
+ assertNull(converter.getQuery("book"));
+ assertNull(converter.getInvertedQuery("book"));
}
+
@Test
- public void testSelection() throws ParseException, IllegalArgumentException, UnsupportedOperationException {
+ void testSelection() throws ParseException, IllegalArgumentException, UnsupportedOperationException {
DocumentSelectionConverter converter = new DocumentSelectionConverter("music.expire>music.expire.nowdate");
- assertTrue(converter.getQuery("music") == null);
- assertTrue(converter.getInvertedQuery("music") == null);
+ assertNull(converter.getQuery("music"));
+ assertNull(converter.getInvertedQuery("music"));
}
}