From: Laramie Crocker Date: Tue, 10 May 2011 22:38:45 +0000 (+0000) Subject: cspace-3899 schema working, client tests not working yet X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=1fc822bafc066034d6a3cc4f2a2d9674312db7e5;p=tmp%2Fjakarta-migration.git cspace-3899 schema working, client tests not working yet --- diff --git a/services/batch/3rdparty/nuxeo-platform-cs-batch/src/main/resources/schemas/batch_common.xsd b/services/batch/3rdparty/nuxeo-platform-cs-batch/src/main/resources/schemas/batch_common.xsd index 749ab3afc..6ce08a59f 100644 --- a/services/batch/3rdparty/nuxeo-platform-cs-batch/src/main/resources/schemas/batch_common.xsd +++ b/services/batch/3rdparty/nuxeo-platform-cs-batch/src/main/resources/schemas/batch_common.xsd @@ -21,18 +21,11 @@ - - - - - - - - - - - - - - + + + + + + + diff --git a/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchAuthRefsTest.java b/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchAuthRefsTest.java index 38e1f0586..5eac14ff1 100644 --- a/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchAuthRefsTest.java +++ b/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchAuthRefsTest.java @@ -68,8 +68,11 @@ public class BatchAuthRefsTest extends BaseServiceTest { private List personIdsCreated = new ArrayList(); private String personAuthCSID = null; private String depositorRefName = null; - private String exitDate = null; - private String exitNumber = null; + + private String name = null; + private String className = null; + private String forDocType = null; + private String notes = null; @Override public String getServicePathComponent() { @@ -91,14 +94,15 @@ public class BatchAuthRefsTest extends BaseServiceTest { throw new UnsupportedOperationException(); //method not supported (or needed) in this test class } - private PoxPayloadOut createBatchInstance(String depositorRefName, String exitNumber, String exitDate) { - this.exitDate = exitDate; - this.exitNumber = exitNumber; - this.depositorRefName = depositorRefName; + private PoxPayloadOut createBatchInstance(String className, String forDocType, String notes) { + this.className = className; + this.forDocType = forDocType; + this.notes = notes; + BatchCommon batch = new BatchCommon(); - batch.setDepositor(depositorRefName); - batch.setExitNumber(exitNumber); - batch.setExitDate(exitDate); + batch.setClassName(className); + batch.setForDocType(forDocType); + batch.setNotes(notes); PoxPayloadOut multipart = new PoxPayloadOut(BatchClient.SERVICE_PAYLOAD_NAME); PayloadOutputPart commonPart = multipart.addPart(batch, MediaType.APPLICATION_XML_TYPE); @@ -170,9 +174,10 @@ public class BatchAuthRefsTest extends BaseServiceTest { logger.debug(objectAsXmlString(batch, BatchCommon.class)); // Check a couple of fields - Assert.assertEquals(batch.getDepositor(), depositorRefName); - Assert.assertEquals(batch.getExitDate(), exitDate); - Assert.assertEquals(batch.getExitNumber(), exitNumber); + Assert.assertEquals(batch.getClassName(), className); + Assert.assertEquals(batch.getForDocType(), forDocType); + Assert.assertEquals(batch.getName(), name); + Assert.assertEquals(batch.getNotes(), notes); // Get the auth refs and check them ClientResponse res2 = batchClient.getAuthorityRefs(knownResourceId); diff --git a/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchServiceTest.java b/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchServiceTest.java index 8b6551006..efc5051ac 100644 --- a/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchServiceTest.java +++ b/services/batch/client/src/test/java/org/collectionspace/services/client/test/BatchServiceTest.java @@ -172,7 +172,7 @@ public class BatchServiceTest extends AbstractServiceTestImpl { BatchCommon batch = (BatchCommon) extractPart(input, client.getCommonPartName(), BatchCommon.class); Assert.assertNotNull(batch); - batch.setExitNumber("updated-" + batch.getExitNumber()); + batch.setName("updated-" + batch.getName()); logger.debug("Object to be updated:"+objectAsXmlString(batch, BatchCommon.class)); PoxPayloadOut output = new PoxPayloadOut(BatchClient.SERVICE_PAYLOAD_NAME); PayloadOutputPart commonPart = output.addPart(batch, MediaType.APPLICATION_XML_TYPE); @@ -288,8 +288,7 @@ public class BatchServiceTest extends AbstractServiceTestImpl { private PoxPayloadOut createBatchInstance(String exitNumber) { String identifier = "batchNumber-" + exitNumber; BatchCommon batch = new BatchCommon(); - batch.setExitNumber(identifier); - batch.setDepositor("urn:cspace:org.collectionspace.demo:orgauthority:name(TestOrgAuth):organization:name(Northern Climes Museum)'Northern Climes Museum'"); + batch.setName(identifier); PoxPayloadOut multipart = new PoxPayloadOut(BatchClient.SERVICE_PAYLOAD_NAME); PayloadOutputPart commonPart = multipart.addPart(batch, MediaType.APPLICATION_XML_TYPE); commonPart.setLabel(new BatchClient().getCommonPartName()); diff --git a/services/batch/jaxb/src/main/resources/batch_common.xsd b/services/batch/jaxb/src/main/resources/batch_common.xsd index 9645abe9c..181e59724 100644 --- a/services/batch/jaxb/src/main/resources/batch_common.xsd +++ b/services/batch/jaxb/src/main/resources/batch_common.xsd @@ -1,16 +1,5 @@ - - - - - - - - - - + + + + + + - - - - - - @@ -69,17 +50,10 @@ - - - - - - - + + + +