From 35a19e710d8c219cf5781ab82f2ce65c995f1980 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Thu, 10 May 2012 12:03:47 -0700 Subject: [PATCH] CSPACE-5126: Payloads for XmlReplay tests for person, location, organization, and objectexit now updated and related tests are passing. --- .../xmlreplay/authrefs/newPerson.xml | 24 ++++++++++++++----- .../xmlreplay/authrefs/newPerson1.xml | 15 +++++++++--- .../xmlreplay/authrefs/newPerson2.xml | 17 +++++++++---- .../authrefs/organizations_common.xml | 22 +++++++++++++---- .../xmlreplay/authrefs/updatePerson1.xml | 15 +++++++++--- .../xmlreplay/authrefs/updatePerson2.xml | 15 +++++++++--- .../organization/hierarchy/1-authority.xml | 20 +++++++++++++++- .../organization/hierarchy/2-item.xml | 21 ++++++++++++++-- .../hierarchy/3-organizations_w_relations.xml | 22 ++++++++++++++--- .../test-data/xmlreplay/xml-replay-master.xml | 12 ++++++---- .../java/RemoteDocumentModelHandlerImpl.java | 10 ++++---- 11 files changed, 155 insertions(+), 38 deletions(-) diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson.xml index eef3b8b76..01634aa30 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson.xml @@ -1,9 +1,21 @@ + -4a6dc8f3-3329-4c5d-a1a8 -connieContactPerson -urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth':person:name(connieContactPerson) -true -Connie -ContactPerson + 4a6dc8f3-3329-4c5d-a1a8 + connieContactPerson + urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth':person:name(connieContactPerson) + + + + Connie ContactPerson + false + Connie ContactPerson + ${termStatus} + Connie + ContactPerson + + + \ No newline at end of file diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml index ee80f561a..308cf1215 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml @@ -2,8 +2,17 @@ connieContactPerson - true - Connie - ContactPerson + + + + Connie ContactPerson + false + Connie ContactPerson + ${termStatus} + Connie + ContactPerson + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml index 7fc57fadc..610c72e45 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml @@ -1,9 +1,18 @@ - debbieDoNothingPerson - true - Debbie - DoNothingPerson + debbieDoNothingPerson + + + + Debbie DoNothingPerson + false + Debbie DoNothingPerson + ${termStatus} + Debbie + DoNothingPerson + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/organizations_common.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/organizations_common.xml index 0172a1131..0b392fdd4 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/organizations_common.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/organizations_common.xml @@ -3,10 +3,24 @@ 1288047801161 - true - true - Test Organization-1288047801161 - Test Organization Name + + + + + Test Organization-1288047801161 + + + + + false + Test Organization Name + + + + + + + ${person1} ${person2} diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml index 7d3103a31..ff4147715 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml @@ -2,8 +2,17 @@ connieContactPerson - true - Connie - ContactPersonlity + + + + Connie ContactPerson + false + Connie ContactPerson + ${termStatus} + Connie + ContactPersonlity + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml index 73cc9431b..89508b600 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml @@ -2,8 +2,17 @@ debbieDoNothingPerson - true - Debbie - Do Nothing Personality + + + + Debbie DoNothingPerson + false + Debbie DoNothingPerson + ${termStatus} + Debbie + Do Nothing Personality + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/1-authority.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/1-authority.xml index c58cf0ce6..24f200d25 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/1-authority.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/1-authority.xml @@ -2,9 +2,27 @@ ${shortIdentifier} - ${displayName} urn:cspace:org.collectionspace.demo:orgauthority:name(${shortIdentifier})'${displayName}' OrgAuthority + + + + + ${displayName} + + + + + false + ${displayName} + + The real official test organization + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/2-item.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/2-item.xml index efb3fba28..140a511dd 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/2-item.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/2-item.xml @@ -3,8 +3,25 @@ ${shortIdentifier} urn:cspace:org.collectionspace.demo:orgauthority:name(${authShortIdentifier}):organization:name(${shortIdentifier}) - true - true + + + + + 2-item-termName + + + + + false + 2-item-termDisplayName + + The real test official test organization + + + + + + Test Organization Name diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/3-organizations_w_relations.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/3-organizations_w_relations.xml index ed27f0139..16bb19314 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/3-organizations_w_relations.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/organization/hierarchy/3-organizations_w_relations.xml @@ -4,9 +4,25 @@ ${inAuthority} ${shortIdentifier} urn:cspace:org.collectionspace.demo:organizationauthority:name(${authShortIdentifier}):organization:name(${shortIdentifier})'${name}' - ${name} - false - true + + + + + ${name} + + + + + false + ${name} + + The real test official test organization + + + + + + + + diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java index f05ee9a9f..c424b2ee9 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java @@ -745,11 +745,13 @@ public abstract class RemoteDocumentModelHandlerImpl // Some other variant on a missing sub-field; quietly // absorb. result = ""; - } // Otherwise, e.g., for true OOB indices, propagate the - // exception. + } + } + // Otherwise, e.g., for true OOB indices, propagate the exception. + if (result == null) { + throw new RuntimeException("Problem retrieving property {" + xpath + + "}:" + ioobe.getLocalizedMessage()); } - throw new RuntimeException("Problem retrieving property {" + xpath - + "}:" + ioobe.getLocalizedMessage()); } catch (Exception e) { throw new RuntimeException("Unknown problem retrieving property {" + xpath + "}." + e.getLocalizedMessage()); -- 2.47.3