diff options
author | 2020-02-17 11:28:35 +0200 | |
---|---|---|
committer | 2020-02-17 09:52:36 +0000 | |
commit | 2f60aa71dc51b6748ead045d363fd2f0d7f50286 (patch) | |
tree | 4b3268cb9fcc90a2ff1ca465412f94041871cf9b /vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java | |
parent | a4fd70a3a183a3ced4c46415a25d081ece8ac098 (diff) |
Test AaiController's get-tenants existing flow
Issue-ID: VID-758
Change-Id: I0839260d3e43697cb15e8e0f8998e521c9d3a2f6
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java b/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java index 71f7ee015..242977f59 100644 --- a/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java +++ b/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java @@ -189,10 +189,10 @@ public class TestUtils { return result; } - private static <T> List<String> allStringPropertiesOf(T object) { - return getPropertyDescriptorsRecursively(object.getClass()).stream() - .filter(descriptor -> descriptor.getPropertyType().isAssignableFrom(String.class)) - .map(PropertyDescriptor::getDisplayName) + private static <T> List<String> allStringFieldsOf(T object) { + return FieldUtils.getAllFieldsList(object.getClass()).stream() + .filter(field -> field.getType().isAssignableFrom(String.class)) + .map(Field::getName) .distinct() .collect(toList()); } @@ -231,8 +231,8 @@ public class TestUtils { * @param <T> * @return The modified object */ - public static <T> T setStringsInStringProperties(T object) { - allStringPropertiesOf(object).forEach(it -> { + public static <T> T setStringsInStringFields(T object) { + allStringFieldsOf(object).forEach(it -> { try { FieldUtils.writeField(object, it, it, true); } catch (IllegalAccessException e) { |