diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-07-28 12:54:37 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-07-28 14:51:34 +0200 |
commit | 34ec3d76225844cfed51e407b2f41cd3e311bf47 (patch) | |
tree | 8e8dccbd556c4fce1fba37cdf379538d61fe4922 /container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java | |
parent | 30b533c56ff0286aa3831889f46ba7c19e393ec0 (diff) |
Convert container-search to junit5
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java')
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java index 3a1a60df7af..12cbe488485 100644 --- a/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java +++ b/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java @@ -3,16 +3,13 @@ package com.yahoo.search.dispatch; import com.yahoo.search.dispatch.SearchPath.InvalidSearchPathException; import com.yahoo.search.dispatch.searchcluster.Node; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collection; import java.util.Set; import java.util.stream.Collectors; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; /** * @author ollivir @@ -20,7 +17,7 @@ import static org.junit.Assert.fail; public class SearchPathTest { @Test - public void requreThatSearchPathsAreParsedCorrectly() { + void requreThatSearchPathsAreParsedCorrectly() { assertEquals(SearchPath.fromString("0/0").get().toString(), "0/0"); assertEquals(SearchPath.fromString("1/0").get().toString(), "1/0"); assertEquals(SearchPath.fromString("0/1").get().toString(), "0/1"); @@ -43,7 +40,7 @@ public class SearchPathTest { } @Test - public void requreThatWildcardsAreDetected() { + void requreThatWildcardsAreDetected() { assertFalse(SearchPath.fromString("").isPresent()); assertFalse(SearchPath.fromString("*/*").isPresent()); assertFalse(SearchPath.fromString("/").isPresent()); @@ -52,7 +49,7 @@ public class SearchPathTest { } @Test - public void invalidRangeMustThrowException() { + void invalidRangeMustThrowException() { try { SearchPath.fromString("[p,0>/0"); fail("Expected exception"); @@ -63,7 +60,7 @@ public class SearchPathTest { } @Test - public void invalidPartMustThrowException() { + void invalidPartMustThrowException() { try { SearchPath.fromString("p/0"); fail("Expected exception"); @@ -74,7 +71,7 @@ public class SearchPathTest { } @Test - public void invalidRowMustThrowException() { + void invalidRowMustThrowException() { try { SearchPath.fromString("1,2,3/r"); fail("Expected exception"); @@ -92,8 +89,8 @@ public class SearchPathTest { } @Test - public void searchPathMustFilterNodesBasedOnDefinition() { - MockSearchCluster cluster = new MockSearchCluster("a",3, 3); + void searchPathMustFilterNodesBasedOnDefinition() { + MockSearchCluster cluster = new MockSearchCluster("a", 3, 3); assertEquals(distKeysAsString(SearchPath.selectNodes("1/1", cluster)), "4"); assertEquals(distKeysAsString(SearchPath.selectNodes("/1", cluster)), "3,4,5"); |