]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3231: Added test to determine whether it is possible to set a field value...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 24 Nov 2010 23:50:26 +0000 (23:50 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 24 Nov 2010 23:50:26 +0000 (23:50 +0000)
services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java

index b8d2c9368bae34fc3ca529706c643dd0d9bbe6a8..729af0e51e2f3faa6cc74de4f4e39be49f6b12d2 100644 (file)
@@ -442,13 +442,16 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         // Update the content of this resource.
         movement.setMovementReferenceNumber("updated-" + movement.getMovementReferenceNumber());
         movement.setMovementNote("updated movement note-" + movement.getMovementNote());
+        movement.setNormalLocation(""); // Test deletion of existing string value
+
+        String currentTimestamp = GregorianCalendarDateTimeUtils.timestampUTC();
+        movement.setPlannedRemovalDate(""); // Test deletion of existing date or date/time value
+        movement.setRemovalDate(currentTimestamp);
+
         if(logger.isDebugEnabled()){
             logger.debug("to be updated object");
             logger.debug(objectAsXmlString(movement, MovementsCommon.class));
         }
-        String currentTimestamp = GregorianCalendarDateTimeUtils.timestampUTC();
-        movement.setPlannedRemovalDate(""); // Test deletion of existing date or date/time value
-        movement.setRemovalDate(currentTimestamp);
 
         // Submit the request to the service and store the response.
         MultipartOutput output = new MultipartOutput();
@@ -476,6 +479,12 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
             logger.debug(objectAsXmlString(movement, MovementsCommon.class));
         }
 
+        Assert.assertEquals(updatedMovement.getNormalLocation(),
+            movement.getNormalLocation(), "Data in updated object did not match submitted data.");
+        if(logger.isDebugEnabled()){
+            logger.debug("Normal location after update=|" + updatedMovement.getNormalLocation() + "|");
+        }
+
         Assert.assertEquals(updatedMovement.getMovementReferenceNumber(),
             movement.getMovementReferenceNumber(),
             "Data in updated object did not match submitted data.");
@@ -645,6 +654,7 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
      */
+
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
         dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
@@ -653,6 +663,7 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
         }
+        /*
         // Perform setup.
         setupDelete();
 
@@ -669,8 +680,11 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+     *
+     */
     }
 
+
     // Failure outcomes
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)