diff options
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/query/properties/test/SubPropertiesTestCase.java')
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/query/properties/test/SubPropertiesTestCase.java | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/query/properties/test/SubPropertiesTestCase.java b/container-search/src/test/java/com/yahoo/search/query/properties/test/SubPropertiesTestCase.java index 11c249c5cdb..0e9bf8d41ec 100644 --- a/container-search/src/test/java/com/yahoo/search/query/properties/test/SubPropertiesTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/query/properties/test/SubPropertiesTestCase.java @@ -1,15 +1,14 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.query.properties.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import java.util.Arrays; import java.util.HashSet; import com.yahoo.processing.request.properties.PropertyMap; -import org.junit.Test; - +import org.junit.jupiter.api.Test; import com.yahoo.search.query.properties.SubProperties; /** @@ -18,19 +17,21 @@ import com.yahoo.search.query.properties.SubProperties; public class SubPropertiesTestCase { @Test - public void testSubProperties() { - PropertyMap map = new PropertyMap() {{ - set("a.e","1"); - set("a.f",2); - set("b.e","3"); - set("f",3); - set("e","2"); - set("d","a"); - }}; + void testSubProperties() { + PropertyMap map = new PropertyMap() { + { + set("a.e", "1"); + set("a.f", 2); + set("b.e", "3"); + set("f", 3); + set("e", "2"); + set("d", "a"); + } + }; SubProperties sub = new SubProperties("a", map); - assertEquals("1",sub.get("e")); - assertEquals(2,sub.get("f")); + assertEquals("1", sub.get("e")); + assertEquals(2, sub.get("f")); assertNull(sub.get("d")); assertEquals(new HashSet<>(Arrays.asList("e", "f")), sub.listProperties("").keySet()); } |