private String acquisitionAuthorizerRefName = null;
private List<String> acquisitionFundingSourcesRefNames = new ArrayList<String>();
private List<String> acquisitionSourcesRefNames = new ArrayList<String>();
- private final int NUM_AUTH_REFS_EXPECTED = 5;
+ private final int NUM_AUTH_REFS_EXPECTED = 3;
/* (non-Javadoc)
* @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
String csid = createPerson("Annie", "Authorizer", "annieAuth", authRefName);
acquisitionAuthorizerRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
personIdsCreated.add(csid);
-
+
+ /*
csid = createPerson("Fran", "Funding-SourceOne", "franFundingSourceOne", authRefName);
acquisitionFundingSourcesRefNames.add(PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null));
personIdsCreated.add(csid);
csid = createPerson("Fahd", "Funding-SourceTwo", "fahdFundingSourceTwo", authRefName);
acquisitionFundingSourcesRefNames.add(PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null));
personIdsCreated.add(csid);
+ */
csid = createPerson("Sammy", "SourceOne", "sammySourceOne", authRefName);
acquisitionSourcesRefNames.add(PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null));
Assert.assertEquals(acquisition.getAcquisitionAuthorizer(), acquisitionAuthorizerRefName);
// In repeatable groups of fields
+ /*
AcquisitionFundingList acqFundingList = acquisition.getAcquisitionFundingList();
List<AcquisitionFunding> acqFundings = acqFundingList.getAcquisitionFunding();
List<String> acqFundingSourceRefNamesFound = new ArrayList();
acqFundingSourceRefNamesFound.add(acqFundingSourceRefName);
}
Assert.assertTrue(acqFundingSourceRefNamesFound.containsAll(acquisitionFundingSourcesRefNames));
+ */
// In scalar repeatable fields
AcquisitionSourceList acquisitionSources = acquisition.getAcquisitionSources();
AcquisitionsCommon acquisition = new AcquisitionsCommon();
acquisition.setAccessionDate(accessionDate);
acquisition.setAcquisitionAuthorizer(acquisitionAuthorizer);
-
+
+ /*
AcquisitionFundingList acqFundingsList = new AcquisitionFundingList();
List<AcquisitionFunding> acqFundings = acqFundingsList.getAcquisitionFunding();
int i = 0;
addtlAcqFunding.setAcquisitionFundingCurrency("USD");
acqFundings.add(addtlAcqFunding);
acquisition.setAcquisitionFundingList(acqFundingsList);
+ */
AcquisitionSourceList acqSourcesList = new AcquisitionSourceList();
List<String> acqSources = acqSourcesList.getAcquisitionSource();
label="acquisitions_common" updated="" order="1">
<service:properties>
<types:item><types:key>authRef</types:key><types:value>acquisitionAuthorizer</types:value></types:item>
- <types:item><types:key>authRef</types:key><types:value>acquisitionFundingList|acquisitionFundingSource</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>acquisitionSources|acquisitionSource</types:value></types:item>
+ <!-- Commented out for now, as searching within a field in a complexType breaks searches for referenced objects -->
+ <!-- <types:item><types:key>authRef</types:key><types:value>acquisitionFundingList|acquisitionFundingSource</types:value></types:item> -->
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent
label="acquisitions_common" updated="" order="1">
<service:properties>
<types:item><types:key>authRef</types:key><types:value>acquisitionAuthorizer</types:value></types:item>
- <types:item><types:key>authRef</types:key><types:value>acquisitionFundingList|acquisitionFundingSource</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>acquisitionSources|acquisitionSource</types:value></types:item>
+ <!-- Commented out for now, as searching within a field in a complexType breaks searches for referenced objects -->
+ <!-- <types:item><types:key>authRef</types:key><types:value>acquisitionFundingList|acquisitionFundingSource</types:value></types:item> -->
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent
// Success outcomes
- // FIXME: Uncomment @Test annotation after CSPACE-2577 is fixed.
-
- // @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
- // dependsOnMethods = {"createIntakeWithAuthRefs"})
+ @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
+ dependsOnMethods = {"createIntakeWithAuthRefs"})
public void readAndCheckAuthRefDocs(String testName) throws Exception {
if (logger.isDebugEnabled()) {
testSetup(STATUS_OK, ServiceRequestType.READ);
// Get the auth ref docs and check them
+
+ // Single scalar field
PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
ClientResponse<AuthorityRefDocList> refDocListResp =
personAuthClient.getReferencingObjects(personAuthCSID, currentOwnerPersonCSID);
Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
AuthorityRefDocList list = refDocListResp.getEntity();
+ // Repeatable scalar field
+
+ // FIXME: Add an appropriate test here, or preferably a new test case.
+
// Optionally output additional data about list members for debugging.
boolean iterateThroughList = true;
boolean fFoundIntake = false;