|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
|
* Copyright 2012-2020 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -75,6 +75,10 @@ class PropertyDescriptorResolverTests {
|
|
|
|
|
PropertyDescriptorResolver resolver = new PropertyDescriptorResolver(metadataEnv);
|
|
|
|
|
assertThat(resolver.resolve(type, null).map(PropertyDescriptor::getName)).containsExactly("third",
|
|
|
|
|
"second", "first");
|
|
|
|
|
assertThat(resolver.resolve(type, null).map(
|
|
|
|
|
(descriptor) -> descriptor.getGetter().getEnclosingElement().getSimpleName().toString()))
|
|
|
|
|
.containsExactly("HierarchicalProperties", "HierarchicalPropertiesParent",
|
|
|
|
|
"HierarchicalPropertiesParent");
|
|
|
|
|
assertThat(resolver.resolve(type, null)
|
|
|
|
|
.map((descriptor) -> descriptor.resolveItemMetadata("test", metadataEnv))
|
|
|
|
|
.map(ItemMetadata::getDefaultValue)).containsExactly("three", "two", "one");
|
|
|
|
|