import org.collectionspace.services.acquisition.AcquisitionsCommon;
import org.collectionspace.services.acquisition.AcquisitionDateList;
-import org.collectionspace.services.acquisition.AcquisitionFunding;
-import org.collectionspace.services.acquisition.AcquisitionFundingList;
import org.collectionspace.services.acquisition.AcquisitionSourceList;
import org.collectionspace.services.acquisition.OwnerList;
import org.jboss.resteasy.client.ClientResponse;
-import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
import org.testng.Assert;
import org.testng.annotations.Test;
// Utility methods used by tests above
// ---------------------------------------------------------------
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ return createAcquisitionInstance(identifier);
+ }
+
/**
* Creates the acquisition instance.
*
@GET
@Path("{csid}")
public byte[] getAcquisition(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getAcquisition with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
*/
@GET
@Path("{csid}")
- public byte[] getAuthority(@PathParam("csid") String specifier) {
+ public byte[] getAuthority(
+ @Context UriInfo ui,
+ @PathParam("csid") String specifier) {
PoxPayloadOut result = null;
try {
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
Specifier spec = getSpecifier(specifier, "getAuthority", "GET");
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
if(spec.form == SpecifierForm.CSID) {
if (logger.isDebugEnabled()) {
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
+import org.collectionspace.services.client.BlobProxy;
import org.collectionspace.services.client.CollectionSpaceClient;
import org.collectionspace.services.client.BlobClient;
import org.collectionspace.services.client.PayloadOutputPart;
}
@Override
- protected CollectionSpaceClient getClientInstance() {
+ protected CollectionSpaceClient<AbstractCommonList, BlobProxy> getClientInstance() {
return new BlobClient();
}
// ---------------------------------------------------------------
// Utility methods used by tests above
// ---------------------------------------------------------------
+
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ return createBlobInstance(identifier);
+ }
+
private PoxPayloadOut createBlobInstance(String exitNumber) {
String identifier = "blobNumber-" + exitNumber;
BlobsCommon blob = new BlobsCommon();
return getProxy().read(csid);\r
}\r
\r
+ @Override\r
+ public ClientResponse<String> readIncludeDeleted(String csid, Boolean includeDeleted) {\r
+ return getProxy().readIncludeDeleted(csid, includeDeleted.toString());\r
+ }\r
+\r
@Override\r
public ClientResponse<String> update(String csid, PoxPayloadOut xmlPayload) {\r
return getProxy().update(csid, xmlPayload.getBytes());\r
* Common service calls\r
*/\r
public ClientResponse<Response> create(PoxPayloadOut xmlPayload);\r
- \r
+ \r
+ /*\r
+ * GET resource with workflow 'deleted' state\r
+ */\r
public ClientResponse<String> read(String csid);\r
+ \r
+ public ClientResponse<String> readIncludeDeleted(String csid, Boolean includeDeleted); \r
\r
public ClientResponse<String> update(String csid, PoxPayloadOut xmlPayload);\r
\r
+ /*\r
+ * GET list with workflow 'deleted' state\r
+ */\r
public ClientResponse<LT> readIncludeDeleted(Boolean includeDeleted);\r
}\r
@Path("/{csid}")\r
ClientResponse<String> read(@PathParam("csid") String csid);\r
\r
+ //(R)ead\r
+ @GET\r
+ @Path("/{csid}")\r
+ ClientResponse<String> readIncludeDeleted(@PathParam("csid") String csid,\r
+ @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);\r
+\r
//(U)pdate\r
@PUT\r
@Path("/{csid}")\r
Assert.assertEquals(updatedWorkflowCommons.getCurrentLifeCycleState(), lifeCycleState);
}
- protected long readIncludeDeleted(String testName, Boolean includeDeleted) {
- long result = 0;
- // Perform setup.
- setupReadList();
-
- //
- // Check to see if we have a POX client
- //
+ private CollectionSpacePoxClient assertPoxCandidate() {
CollectionSpaceClient clientCandidate = this.getClientInstance();
if (CollectionSpacePoxClient.class.isInstance(clientCandidate) != true) { //FIXME: REM - We should remove this check and instead make CollectionSpaceClient support the readIncludeDeleted() method.
String clientCandidateName = "Unknown";
logger.warn(msg);
throw new UnsupportedOperationException();
}
-
+ return (CollectionSpacePoxClient)clientCandidate;
+ }
+
+ protected long readIncludeDeleted(String testName, Boolean includeDeleted) {
+ long result = 0;
+ // Perform setup.
+ setupReadList();
+
//
// Ask for a list of all resources filtered by the incoming 'includeDeleted' workflow param
//
- CollectionSpacePoxClient client = (CollectionSpacePoxClient)clientCandidate;
+ CollectionSpacePoxClient client = assertPoxCandidate();
ClientResponse<AbstractCommonList> res = client.readIncludeDeleted(includeDeleted);
AbstractCommonList list = res.getEntity();
int statusCode = res.getStatus();
//
long updatedTotal = readIncludeDeleted(testName, Boolean.FALSE);
Assert.assertEquals(updatedTotal, existingRecords + OBJECTS_TO_CREATE - 1, "Deleted items seem to be returned in list results.");
+
+ //
+ // Next, test that a GET with WorkflowClient.WORKFLOWSTATE_DELETED query param set to 'false' returns a 404
+ //
+ CollectionSpacePoxClient client = this.assertPoxCandidate();
+ ClientResponse<String> res = client.readIncludeDeleted(csid, Boolean.FALSE);
+ int result = res.getStatus();
+ Assert.assertEquals(result, STATUS_NOT_FOUND);
+
} catch (UnsupportedOperationException e) {
logger.warn(this.getClass().getName() + " did not implement createWorkflowTarget() method. No workflow tests performed.");
return;
/*
* Sub-classes must override for the workflow tests.
*/
-
protected PoxPayloadOut createInstance(String identifier) {
logger.warn("Sub-class test clients should override this method");
throw new UnsupportedOperationException();
@GET
@Path("{csid}")
public byte[] getCollectionObject(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getCollectionObject with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
\r
@GET\r
@Path("{csid}")\r
- public byte[] get(@PathParam("csid") String csid) {\r
+ public byte[] get(\r
+ @Context UriInfo ui, \r
+ @PathParam("csid") String csid) {\r
PoxPayloadOut result = null;\r
ensureCSID(csid, READ);\r
try {\r
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();\r
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();\r
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);\r
result = get(csid, ctx);// ==> CALL implementation method, which subclasses may override.\r
if (result == null) {\r
Response response = Response.status(Response.Status.NOT_FOUND).entity(\r
//
String currentState = docModel.getCurrentLifeCycleState();
String includeDeletedStr = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_NONDELETED);
- boolean includeDeleted = Boolean.parseBoolean(includeDeletedStr);
+ boolean includeDeleted = includeDeletedStr == null ? true : Boolean.parseBoolean(includeDeletedStr);
if (includeDeleted == false) {
//
// We don't wanted soft-deleted object, so throw an exception if this one is soft-deleted.
return response.getEntity(ContactsCommonList.class);
}
+// @Override
+// protected PoxPayloadOut createInstance(String identifier) {
+// ContactClient client = new ContactClient();
+// PoxPayloadOut multipart =
+// ContactClientUtils.createContactInstance(identifier, client.getCommonPartName());
+// return multipart;
+// }
+
// ---------------------------------------------------------------
// CRUD tests : CREATE tests
// ---------------------------------------------------------------
@GET
@Path("{csid}")
public String getContact(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getContact with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
*/
@Override
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
- dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
+ dependsOnMethods = {"create", "readList", "testSubmitRequest", "update", "readWorkflow"})
public void delete(String testName) throws Exception {
if (logger.isDebugEnabled()) {
return DimensionClient.SERVICE_PATH_COMPONENT;
}
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ DimensionClient client = new DimensionClient();
+ return createDimensionInstance(client.getCommonPartName(), identifier);
+ }
+
/**
* Creates the dimension instance.
*
return multipart;
}
- @Override
- protected String createTestObject(String testName) throws Exception {
- String result = null;
-
- DimensionClient client = new DimensionClient();
- String identifier = createIdentifier();
- PoxPayloadOut multipart = createDimensionInstance(client.getCommonPartName(),
- identifier);
- ClientResponse<Response> res = client.create(multipart);
-
- int statusCode = res.getStatus();
- Assert.assertEquals(statusCode, STATUS_CREATED);
-
- result = extractId(res);
- allResourceIdsCreated.add(result);
-
- return result;
- }
+// @Override
+// protected String createTestObject(String testName) throws Exception {
+// String result = null;
+//
+// DimensionClient client = new DimensionClient();
+// String identifier = createIdentifier();
+// PoxPayloadOut multipart = createDimensionInstance(client.getCommonPartName(),
+// identifier);
+// ClientResponse<Response> res = client.create(multipart);
+//
+// int statusCode = res.getStatus();
+// Assert.assertEquals(statusCode, STATUS_CREATED);
+//
+// result = extractId(res);
+// allResourceIdsCreated.add(result);
+//
+// return result;
+// }
- /*
- * This test assumes that no objects exist yet.
- *
- * http://localhost:8180/cspace-services/intakes?wf_deleted=false
- */
- @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, dependsOnMethods = {"update"})
- public void readWorkflowList(String testName) throws Exception {
- //
- // Create 3 new objects
- //
- final int OBJECTS_TOTAL = 3;
- for (int i = 0; i < OBJECTS_TOTAL; i++) {
- this.createWorkflowTarget(testName);
- }
- //
- // Mark one as soft deleted
- //
- int currentTotal = allResourceIdsCreated.size();
- String csid = allResourceIdsCreated.get(currentTotal - 1); //0-based index to get the last one added
- this.setupUpdate();
- this.updateLifeCycleState(testName, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
- //
- // Read the list back. The deleted item should not be in the list
- //
-// int updatedTotal = readIncludeDeleted(testName, Boolean.FALSE);
-// Assert.assertEquals(updatedTotal, currentTotal - 1, "Deleted items seem to be returned in list results.");
- }
+// /*
+// * This test assumes that no objects exist yet.
+// *
+// * http://localhost:8180/cspace-services/intakes?wf_deleted=false
+// */
+// @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, dependsOnMethods = {"update"})
+// public void readWorkflowList(String testName) throws Exception {
+// //
+// // Create 3 new objects
+// //
+// final int OBJECTS_TOTAL = 3;
+// for (int i = 0; i < OBJECTS_TOTAL; i++) {
+// this.createWorkflowTarget(testName);
+// }
+// //
+// // Mark one as soft deleted
+// //
+// int currentTotal = allResourceIdsCreated.size();
+// String csid = allResourceIdsCreated.get(currentTotal - 1); //0-based index to get the last one added
+// this.setupUpdate();
+// this.updateLifeCycleState(testName, csid, WorkflowClient.WORKFLOWSTATE_DELETED);
+// //
+// // Read the list back. The deleted item should not be in the list
+// //
+//// int updatedTotal = readIncludeDeleted(testName, Boolean.FALSE);
+//// Assert.assertEquals(updatedTotal, currentTotal - 1, "Deleted items seem to be returned in list results.");
+// }
protected void updateLifeCycleState(String testName, String resourceId, String lifeCycleState) throws Exception {
//
@GET
@Path("{csid}")
public byte[] getIntake(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getIntake with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
import org.collectionspace.services.loanin.LenderGroup;
import org.collectionspace.services.loanin.LenderGroupList;
import org.collectionspace.services.loanin.LoansinCommon;
-//import org.collectionspace.services.loanin.LoansinCommonList;
import org.jboss.resteasy.client.ClientResponse;
import org.testng.Assert;
-//import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
import org.slf4j.Logger;
return SERVICE_PATH_COMPONENT;
}
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ return createLoaninInstance(identifier);
+ }
+
/**
* Creates the loanin instance.
*
@GET
@Path("{csid}")
public byte[] getLoanin(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getLoanin with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
return LoanoutClient.SERVICE_PATH_COMPONENT;
}
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ return createLoanoutInstance(identifier);
+ }
+
/**
* Creates the loanout instance.
*
@GET
@Path("{csid}")
public byte[] getLoanout(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getLoanout with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
return response.getEntity(LocationsCommonList.class);
}
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ LocationAuthorityClient client = new LocationAuthorityClient();
+ String shortId = createIdentifier();
+ String displayName = "displayName-" + shortId;
+ String baseRefName = LocationAuthorityClientUtils.createLocationAuthRefName(shortId, null);
+ PoxPayloadOut multipart =
+ LocationAuthorityClientUtils.createLocationAuthorityInstance(
+ displayName, shortId, client.getCommonPartName());
+ return multipart;
+ }
+
// ---------------------------------------------------------------
// CRUD tests : CREATE tests
// ---------------------------------------------------------------
Assert.assertEquals(statusCode, EXPECTED_STATUS);
}
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ return createMediaInstance(identifier);
+ }
+
+
// ---------------------------------------------------------------
// Utility methods used by tests above
// ---------------------------------------------------------------
@GET
@Path("{csid}")
public byte[] getMovement(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getMovement with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
import javax.ws.rs.core.Response;
import org.collectionspace.services.client.CollectionSpaceClient;
-import org.collectionspace.services.client.ContactClient;
import org.collectionspace.services.client.ObjectExitClient;
+import org.collectionspace.services.client.ObjectExitProxy;
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.jboss.resteasy.client.ClientResponse;
-import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
import org.testng.Assert;
import org.testng.annotations.Test;
}
@Override
- protected CollectionSpaceClient getClientInstance() {
+ protected CollectionSpaceClient<AbstractCommonList, ObjectExitProxy> getClientInstance() {
return new ObjectExitClient();
}
// ---------------------------------------------------------------
// Utility methods used by tests above
// ---------------------------------------------------------------
+
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ ObjectExitClient client = new ObjectExitClient();
+ return createObjectExitInstance(identifier);
+ }
+
private PoxPayloadOut createObjectExitInstance(String exitNumber) {
String identifier = "objectexitNumber-" + exitNumber;
ObjectexitCommon objectexit = new ObjectexitCommon();
return response.getEntity(ReportsCommonList.class);
}
+// @Override
+// protected PoxPayloadOut createInstance(String identifier) {
+// PoxPayloadOut multipart = createReportInstance(identifier);
+// return multipart;
+// }
+
// ---------------------------------------------------------------
// CRUD tests : CREATE tests
// ---------------------------------------------------------------
*/
@Override
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
- dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
+ dependsOnMethods = {"create", "readList", "testSubmitRequest", "update", "readWorkflow"})
public void delete(String testName) throws Exception {
if (logger.isDebugEnabled()) {
@GET
@Path("{csid}")
public byte[] getReport(
+ @Context UriInfo ui,
@PathParam("csid") String csid) {
if (logger.isDebugEnabled()) {
logger.debug("getReport with csid=" + csid);
}
PoxPayloadOut result = null;
try {
- ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(queryParams);
DocumentHandler handler = createDocumentHandler(ctx);
getRepositoryClient(ctx).get(ctx, csid, handler);
result = ctx.getOutput();
return response.getEntity(VocabulariesCommonList.class);
}
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ VocabularyClient client = new VocabularyClient();
+ String displayName = "displayName-" + identifier;
+ PoxPayloadOut multipart = VocabularyClientUtils.createEnumerationInstance(
+ displayName, identifier, client.getCommonPartName());
+ return multipart;
+ }
+
+
// ---------------------------------------------------------------
// CRUD tests : CREATE tests
// ---------------------------------------------------------------
return response.getEntity(AbstractCommonList.class);
}
-// @Override
-// @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
-// public void create(String testName) throws Exception {
-// logger.debug(testBanner(testName, CLASS_NAME));
-// setupCreate();
-// WorkflowClient client = new WorkflowClient();
-// PoxPayloadOut multipart = createObjectExitInstance(createIdentifier());
-// ClientResponse<Response> res = client.create(multipart);
-// assertStatusCode(res, testName);
-// if (knownResourceId == null) {
-// knownResourceId = extractId(res); // Store the ID returned from the first resource created for additional tests below.
-// logger.debug(testName + ": knownResourceId=" + knownResourceId);
-// }
-// allResourceIdsCreated.add(extractId(res)); // Store the IDs from every resource created by tests so they can be deleted after tests have been run.
-// }
-
-
- /*
- * Create a Dimension instance to use as our test target.
- */
- @Override
- protected String createWorkflowTarget(String testName) throws Exception {
- String result = null;
-
- result = createTestObject(testName);
-
- return result;
- }
-
- /*
- * Create a Dimension instance to use as our test target.
- */
- protected String createTestObject(String testName) throws Exception {
- String result = null;
-
- logger.debug(testBanner(testName, CLASS_NAME));
- setupCreate();
- DimensionClient client = new DimensionClient();
- PoxPayloadOut multipart = createDimensionInstance(createIdentifier());
- ClientResponse<Response> res = client.create(multipart);
- assertStatusCode(res, testName);
- if (knownResourceId == null) {
- knownResourceId = extractId(res); // Store the ID returned from the first resource created for additional tests below.
- logger.debug(testName + ": knownResourceId=" + knownResourceId);
- }
- result = extractId(res);
- allResourceIdsCreated.add(result); // Store the IDs from every resource created by tests so they can be deleted after tests have been run.
-
- return result;
- }
-
@Override
public void createList(String testName) throws Exception {
//empty N/A
// ---------------------------------------------------------------
// Utility methods used by tests above
// ---------------------------------------------------------------
+
+ @Override
+ protected PoxPayloadOut createInstance(String identifier) {
+ return createDimensionInstance(identifier);
+ }
+
private PoxPayloadOut createDimensionInstance(String dimensionValue) {
String value = "dimensionValue-" + dimensionValue;
String dimensionsCommonPartName = new DimensionClient().getCommonPartName();
@Override
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
public void create(String testName) throws Exception {
- this.createTestObject(testName);
+ String csid = this.createTestObject(testName);
+ if (this.knownResourceId == null) {
+ this.knownResourceId = csid;
+ }
}