コード例 #1
0
  private CollectionObject createCollectionObject(String objectNumber, String objectName) {
    CollectionObject collectionObject = new CollectionObject();

    collectionObject.setObjectNumber(objectNumber);
    collectionObject.setObjectName(objectName);

    return collectionObject;
  }
コード例 #2
0
  @Test(dependsOnMethods = {"createCollectionObject"})
  public void updateCollectionObject() {
    ClientResponse<CollectionObject> res = collectionObjectClient.getCollectionObject(updateId);
    CollectionObject collectionObject = res.getEntity();
    verbose(
        "Got CollectionObject to update with ID: " + updateId,
        collectionObject,
        CollectionObject.class);

    // collectionObject.setCsid("updated-" + updateId);
    collectionObject.setObjectNumber("updated-" + collectionObject.getObjectNumber());
    collectionObject.setObjectName("updated-" + collectionObject.getObjectName());

    // make call to update service
    res = collectionObjectClient.updateCollectionObject(updateId, collectionObject);

    // check the response
    CollectionObject updatedCollectionObject = res.getEntity();
    Assert.assertEquals(updatedCollectionObject.getObjectName(), collectionObject.getObjectName());
    verbose("updateCollectionObject: ", updatedCollectionObject, CollectionObject.class);

    return;
  }