From: Aron Roberts Date: Tue, 18 May 2010 01:13:19 +0000 (+0000) Subject: CSPACE-144: Trivial addition of movement methods list in sample records used in clien... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=49d688f3c302eafcd4fadd66d045c62bbef5ee6a;p=tmp%2Fjakarta-migration.git CSPACE-144: Trivial addition of movement methods list in sample records used in client test of the Movement service. --- diff --git a/services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java b/services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java index 3aa5e43cf..50b3fbd75 100644 --- a/services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java +++ b/services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java @@ -31,6 +31,7 @@ import org.collectionspace.services.client.MovementClient; import org.collectionspace.services.jaxb.AbstractCommonList; import org.collectionspace.services.movement.MovementsCommon; import org.collectionspace.services.movement.MovementsCommonList; +import org.collectionspace.services.movement.MovementMethodsList; import org.jboss.resteasy.client.ClientResponse; @@ -676,17 +677,26 @@ public class MovementServiceTest extends AbstractServiceTestImpl { } /** - * Creates the movement instance. + * Creates an instance of a Movement record for testing. * - * @param movementReferenceNumber the movement reference number - * @param locationDate the location date - * @return the multipart output + * @param movementReferenceNumber A movement reference number. + * @param locationDate A location date. + * @return Multipart output suitable for use as a payload + * in a create or update request. */ private MultipartOutput createMovementInstance(String movementReferenceNumber, String locationDate) { MovementsCommon movement = new MovementsCommon(); movement.setMovementReferenceNumber(movementReferenceNumber); movement.setLocationDate(locationDate); + MovementMethodsList movementMethodsList = new MovementMethodsList(); + List methods = movementMethodsList.getMovementMethod(); + // @TODO Use properly formatted refNames for representative movement + // methods in this example record. The values below are placeholders. + String identifier = createIdentifier(); + methods.add("First Movement Method-" + identifier); + methods.add("Second Movement Method-" + identifier); + movement.setMovementMethods(movementMethodsList); MultipartOutput multipart = new MultipartOutput(); OutputPart commonPart = multipart.addPart(movement, MediaType.APPLICATION_XML_TYPE);