diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java index 1c51d3ec365..c0886597de7 100644 --- a/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java @@ -6,14 +6,14 @@ import com.yahoo.schema.ApplicationBuilder; import com.yahoo.schema.AbstractSchemaTestCase; import com.yahoo.schema.document.Attribute; import com.yahoo.schema.parser.ParseException; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Iterator; import static com.yahoo.config.model.test.TestUtil.joinLines; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; /** * Tests attribute deriving @@ -23,7 +23,7 @@ import static org.junit.Assert.assertFalse; public class AttributeListTestCase extends AbstractSchemaTestCase { @Test - public void testDeriving() throws IOException, ParseException { + void testDeriving() throws IOException, ParseException { // Test attribute importing Schema schema = ApplicationBuilder.buildFromFile("src/test/examples/simple.sd"); @@ -31,37 +31,37 @@ public class AttributeListTestCase extends AbstractSchemaTestCase { AttributeFields attributeFields = new AttributeFields(schema); Iterator attributes = attributeFields.attributeIterator(); Attribute attribute; - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("popularity", attribute.getName()); assertEquals(Attribute.Type.INTEGER, attribute.getType()); assertEquals(Attribute.CollectionType.SINGLE, attribute.getCollectionType()); - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("measurement", attribute.getName()); assertEquals(Attribute.Type.INTEGER, attribute.getType()); assertEquals(Attribute.CollectionType.SINGLE, attribute.getCollectionType()); - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("smallattribute", attribute.getName()); assertEquals(Attribute.Type.BYTE, attribute.getType()); assertEquals(Attribute.CollectionType.ARRAY, attribute.getCollectionType()); - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("access", attribute.getName()); assertEquals(Attribute.Type.BYTE, attribute.getType()); assertEquals(Attribute.CollectionType.SINGLE, attribute.getCollectionType()); - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("category_arr", attribute.getName()); assertEquals(Attribute.Type.STRING, attribute.getType()); assertEquals(Attribute.CollectionType.ARRAY, attribute.getCollectionType()); - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("measurement_arr", attribute.getName()); assertEquals(Attribute.Type.INTEGER, attribute.getType()); assertEquals(Attribute.CollectionType.ARRAY, attribute.getCollectionType()); - attribute = (Attribute)attributes.next(); + attribute = (Attribute) attributes.next(); assertEquals("popsiness", attribute.getName()); assertEquals(Attribute.Type.INTEGER, attribute.getType()); assertEquals(Attribute.CollectionType.SINGLE, attribute.getCollectionType()); @@ -70,7 +70,7 @@ public class AttributeListTestCase extends AbstractSchemaTestCase { } @Test - public void fields_in_array_of_struct_are_derived_into_array_attributes() throws IOException, ParseException { + void fields_in_array_of_struct_are_derived_into_array_attributes() throws IOException, ParseException { Schema schema = ApplicationBuilder.buildFromFile("src/test/derived/array_of_struct_attribute/test.sd"); Iterator<Attribute> attributes = new AttributeFields(schema).attributeIterator(); @@ -80,7 +80,7 @@ public class AttributeListTestCase extends AbstractSchemaTestCase { } @Test - public void fields_in_map_of_struct_are_derived_into_array_attributes() throws IOException, ParseException { + void fields_in_map_of_struct_are_derived_into_array_attributes() throws IOException, ParseException { Schema schema = ApplicationBuilder.buildFromFile("src/test/derived/map_of_struct_attribute/test.sd"); Iterator<Attribute> attributes = new AttributeFields(schema).attributeIterator(); @@ -100,15 +100,15 @@ public class AttributeListTestCase extends AbstractSchemaTestCase { } @Test - public void only_zcurve_attribute_is_derived_from_array_of_position_field() throws ParseException { + void only_zcurve_attribute_is_derived_from_array_of_position_field() throws ParseException { Schema schema = ApplicationBuilder.createFromString( joinLines("search test {", - " document test {", - " field pos_array type array<position> {", - " indexing: attribute", - " }", - " }", - "}")).getSchema(); + " document test {", + " field pos_array type array<position> {", + " indexing: attribute", + " }", + " }", + "}")).getSchema(); Iterator<Attribute> attributes = new AttributeFields(schema).attributeIterator(); assertAttribute("pos_array_zcurve", Attribute.Type.LONG, Attribute.CollectionType.ARRAY, true, attributes.next()); @@ -116,7 +116,7 @@ public class AttributeListTestCase extends AbstractSchemaTestCase { } @Test - public void fields_in_map_of_primitive_are_derived_into_array_attributes() throws IOException, ParseException { + void fields_in_map_of_primitive_are_derived_into_array_attributes() throws IOException, ParseException { Schema schema = ApplicationBuilder.buildFromFile("src/test/derived/map_attribute/test.sd"); Iterator<Attribute> attributes = new AttributeFields(schema).attributeIterator(); |