]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-2577: Lists of referencing objects / refObjs now once again successfully retur...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 5 Aug 2010 19:26:27 +0000 (19:26 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 5 Aug 2010 19:26:27 +0000 (19:26 +0000)
services/acquisition/client/src/test/java/org/collectionspace/services/client/test/AcquisitionAuthRefsTest.java
services/common/src/main/config/services/tenant-bindings.xml
services/intake/client/src/test/java/org/collectionspace/services/client/test/OrganizationAuthRefDocsTest.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/PersonAuthRefDocsTest.java

index 7eebf7d0726b6da48d73fe6131437456c0f5dff3..618fa18db479f9fcdc0a3f3fc11d747c3802ae41 100644 (file)
@@ -76,7 +76,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
     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()
@@ -170,7 +170,8 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         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);
@@ -178,6 +179,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         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));
@@ -242,6 +244,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         Assert.assertEquals(acquisition.getAcquisitionAuthorizer(), acquisitionAuthorizerRefName);
         
         // In repeatable groups of fields
+        /*
         AcquisitionFundingList acqFundingList = acquisition.getAcquisitionFundingList();
         List<AcquisitionFunding> acqFundings = acqFundingList.getAcquisitionFunding();
         List<String> acqFundingSourceRefNamesFound = new ArrayList();
@@ -250,6 +253,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
             acqFundingSourceRefNamesFound.add(acqFundingSourceRefName);
         }
         Assert.assertTrue(acqFundingSourceRefNamesFound.containsAll(acquisitionFundingSourcesRefNames));
+        */
 
         // In scalar repeatable fields
         AcquisitionSourceList acquisitionSources = acquisition.getAcquisitionSources();
@@ -359,7 +363,8 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         AcquisitionsCommon acquisition = new AcquisitionsCommon();
         acquisition.setAccessionDate(accessionDate);
         acquisition.setAcquisitionAuthorizer(acquisitionAuthorizer);
-        
+
+        /*
         AcquisitionFundingList acqFundingsList = new AcquisitionFundingList();
         List<AcquisitionFunding> acqFundings = acqFundingsList.getAcquisitionFunding();
         int i = 0;
@@ -374,6 +379,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         addtlAcqFunding.setAcquisitionFundingCurrency("USD");
         acqFundings.add(addtlAcqFunding);
         acquisition.setAcquisitionFundingList(acqFundingsList);
+        */
 
         AcquisitionSourceList acqSourcesList = new AcquisitionSourceList();
         List<String> acqSources = acqSourcesList.getAcquisitionSource();
index 575a3cee020d533ba7f0750119d695e2b3dd2fc6..276929c5ccfb1d97dae8cbe36bb821ee7c212aae 100644 (file)
                               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
index 7fb8d68ee6371a9758bdb44dc3acea0efc26fe30..e32874106ffd35551469921182fd4c088cf75241 100644 (file)
@@ -221,11 +221,8 @@ public class OrganizationAuthRefDocsTest extends BaseServiceTest {
     }\r
 \r
     // Success outcomes\r
-\r
-    // FIXME: Uncomment @Test annotation after CSPACE-2577 is fixed.\r
-\r
-    //@Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,\r
-    //    dependsOnMethods = {"createIntakeWithAuthRefs"})\r
+    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,\r
+        dependsOnMethods = {"createIntakeWithAuthRefs"})\r
     public void readAndCheckAuthRefDocs(String testName) throws Exception {\r
 \r
         if (logger.isDebugEnabled()) {\r
index 2862109ba8bc6116955ab9c29a7f961c86521df5..8dcaf353b556d2349d17c2c4f99cefb1b3a51382 100644 (file)
@@ -229,10 +229,8 @@ public class PersonAuthRefDocsTest extends BaseServiceTest {
 
     // 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()) {
@@ -242,6 +240,8 @@ public class PersonAuthRefDocsTest extends BaseServiceTest {
         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);
@@ -256,6 +256,10 @@ public class PersonAuthRefDocsTest extends BaseServiceTest {
         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;