
Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Don't use method names to infer types ...................................................................... restapi: Don't use method names to infer types Currently when we randomly populate objects in order to run tests, we infer the types of objects contained in lists from the names of the methods. For example, lets say that we have an object that has a "getNics()" method that returns a list of "Nics" objects. We use the word after the "get" prefix to infer the type. In this case we infer that the type will be "Nics". But doing this has the dissadvantage that we force ourselves to use method names (and thus tag names in the XML representation) that match the type names. There was no reasonable alternative in Java 6, but in Java 7 we can obtain the type of the elements of the list directly. This is what we do in this patch. Change-Id: Iadc9827c3885d7b9e39611b006a1b02eefa5c9f0 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/MappingTestHelper.java 1 file changed, 3 insertions(+), 64 deletions(-) Approvals: Shahar Havivi: Looks good to me, but someone else must approve Juan Hernandez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/23513 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadc9827c3885d7b9e39611b006a1b02eefa5c9f0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Ravi Nori <rnori@redhat.com> Gerrit-Reviewer: Shahar Havivi <shavivi@redhat.com>