diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java index 2a3a3ff93e9..719db2ffdcc 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java @@ -59,8 +59,14 @@ public class PagedAttributeValidatorTestCase { } private void assertPagedSupported(String fieldType) throws ParseException { - var appBuilder = createFromString(getSd(fieldType)); - var attribute = appBuilder.getSchema().getAttribute("foo"); + assertPagedSupported(fieldType, Optional.empty()); + } + + private void assertPagedSupported(String fieldType, Optional<String> parentSd) throws ParseException { + var appBuilder = parentSd.isPresent() ? + createFromStrings(new BaseDeployLogger(), parentSd.get(), getSd(fieldType)) : + createFromString(getSd(fieldType)); + var attribute = appBuilder.getSchema("test").getAttribute("foo"); assertTrue(attribute.isPaged()); } @@ -75,8 +81,8 @@ public class PagedAttributeValidatorTestCase { } @Test - void reference_attribute_does_not_support_paged_setting() throws ParseException { - assertPagedSettingNotSupported("reference<parent>", Optional.of(getSd("parent", "int"))); + void reference_attribute_support_paged_setting() throws ParseException { + assertPagedSupported("reference<parent>", Optional.of(getSd("parent", "int"))); } private void assertPagedSettingNotSupported(String fieldType) throws ParseException { |