use of org.activiti.bpmn.model.FieldExtension in project herd by FINRAOS.
the class AddBusinessObjectDataStorageFilesTest method testAddBusinessObjectDataStorageFilesJson.
@Test
public void testAddBusinessObjectDataStorageFilesJson() throws Exception {
BusinessObjectDataStorageFilesCreateRequest businessObjectDataStorageFilesCreateRequest = businessObjectDataServiceTestHelper.getNewBusinessObjectDataStorageFilesCreateRequest();
List<FieldExtension> fieldExtensionList = new ArrayList<>();
fieldExtensionList.add(buildFieldExtension("contentType", "${contentType}"));
fieldExtensionList.add(buildFieldExtension("businessObjectDataStorageFilesCreateRequest", "${businessObjectDataStorageFilesCreateRequest}"));
List<Parameter> parameters = new ArrayList<>();
parameters.add(buildParameter("contentType", "json"));
parameters.add(buildParameter("businessObjectDataStorageFilesCreateRequest", jsonHelper.objectToJson(businessObjectDataStorageFilesCreateRequest)));
Map<String, Object> variableValuesToValidate = new HashMap<>();
variableValuesToValidate.put(BaseJavaDelegate.VARIABLE_JSON_RESPONSE, VARIABLE_VALUE_NOT_NULL);
testActivitiServiceTaskSuccess(AddBusinessObjectDataStorageFiles.class.getCanonicalName(), fieldExtensionList, parameters, variableValuesToValidate);
}
use of org.activiti.bpmn.model.FieldExtension in project herd by FINRAOS.
the class AddBusinessObjectDataStorageFilesTest method testAddBusinessObjectDataStorageFilesXml.
@Test
public void testAddBusinessObjectDataStorageFilesXml() throws Exception {
BusinessObjectDataStorageFilesCreateRequest businessObjectDataStorageFilesCreateRequest = businessObjectDataServiceTestHelper.getNewBusinessObjectDataStorageFilesCreateRequest();
List<FieldExtension> fieldExtensionList = new ArrayList<>();
fieldExtensionList.add(buildFieldExtension("contentType", "${contentType}"));
fieldExtensionList.add(buildFieldExtension("businessObjectDataStorageFilesCreateRequest", "${businessObjectDataStorageFilesCreateRequest}"));
List<Parameter> parameters = new ArrayList<>();
parameters.add(buildParameter("contentType", "xml"));
parameters.add(buildParameter("businessObjectDataStorageFilesCreateRequest", xmlHelper.objectToXml(businessObjectDataStorageFilesCreateRequest)));
Map<String, Object> variableValuesToValidate = new HashMap<>();
variableValuesToValidate.put(BaseJavaDelegate.VARIABLE_JSON_RESPONSE, VARIABLE_VALUE_NOT_NULL);
testActivitiServiceTaskSuccess(AddBusinessObjectDataStorageFiles.class.getCanonicalName(), fieldExtensionList, parameters, variableValuesToValidate);
}
use of org.activiti.bpmn.model.FieldExtension in project herd by FINRAOS.
the class CheckBusinessObjectDataAvailabilityCollectionTest method testCheckBusinessObjectDataAvailabilityCollectionXml.
@Test
public void testCheckBusinessObjectDataAvailabilityCollectionXml() throws Exception {
// Prepare database entities required for testing.
businessObjectDataServiceTestHelper.createDatabaseEntitiesForBusinessObjectDataAvailabilityCollectionTesting();
// Prepare the request.
BusinessObjectDataAvailabilityCollectionRequest request = businessObjectDataServiceTestHelper.getTestBusinessObjectDataAvailabilityCollectionRequest();
List<FieldExtension> fieldExtensionList = new ArrayList<>();
fieldExtensionList.add(buildFieldExtension("contentType", "${contentType}"));
fieldExtensionList.add(buildFieldExtension("businessObjectDataAvailabilityCollectionRequest", "${businessObjectDataAvailabilityCollectionRequest}"));
List<Parameter> parameters = new ArrayList<>();
parameters.add(buildParameter("contentType", "xml"));
parameters.add(buildParameter("businessObjectDataAvailabilityCollectionRequest", xmlHelper.objectToXml(request)));
Map<String, Object> variableValuesToValidate = new HashMap<>();
variableValuesToValidate.put(CheckBusinessObjectDataAvailabilityCollection.VARIABLE_IS_ALL_DATA_AVAILABLE, true);
variableValuesToValidate.put(CheckBusinessObjectDataAvailabilityCollection.VARIABLE_IS_ALL_DATA_NOT_AVAILABLE, false);
variableValuesToValidate.put(BaseJavaDelegate.VARIABLE_JSON_RESPONSE, jsonHelper.objectToJson(businessObjectDataServiceTestHelper.getExpectedBusinessObjectDataAvailabilityCollectionResponse()));
testActivitiServiceTaskSuccess(CheckBusinessObjectDataAvailabilityCollection.class.getCanonicalName(), fieldExtensionList, parameters, variableValuesToValidate);
}
use of org.activiti.bpmn.model.FieldExtension in project herd by FINRAOS.
the class CheckBusinessObjectDataAvailabilityCollectionTest method testCheckBusinessObjectDataAvailabilityCollectionJson.
@Test
public void testCheckBusinessObjectDataAvailabilityCollectionJson() throws Exception {
// Prepare database entities required for testing.
businessObjectDataServiceTestHelper.createDatabaseEntitiesForBusinessObjectDataAvailabilityCollectionTesting();
// Prepare the request.
BusinessObjectDataAvailabilityCollectionRequest request = businessObjectDataServiceTestHelper.getTestBusinessObjectDataAvailabilityCollectionRequest();
List<FieldExtension> fieldExtensionList = new ArrayList<>();
fieldExtensionList.add(buildFieldExtension("contentType", "${contentType}"));
fieldExtensionList.add(buildFieldExtension("businessObjectDataAvailabilityCollectionRequest", "${businessObjectDataAvailabilityCollectionRequest}"));
List<Parameter> parameters = new ArrayList<>();
parameters.add(buildParameter("contentType", "json"));
parameters.add(buildParameter("businessObjectDataAvailabilityCollectionRequest", jsonHelper.objectToJson(request)));
Map<String, Object> variableValuesToValidate = new HashMap<>();
variableValuesToValidate.put(CheckBusinessObjectDataAvailabilityCollection.VARIABLE_IS_ALL_DATA_AVAILABLE, true);
variableValuesToValidate.put(CheckBusinessObjectDataAvailabilityCollection.VARIABLE_IS_ALL_DATA_NOT_AVAILABLE, false);
variableValuesToValidate.put(BaseJavaDelegate.VARIABLE_JSON_RESPONSE, jsonHelper.objectToJson(businessObjectDataServiceTestHelper.getExpectedBusinessObjectDataAvailabilityCollectionResponse()));
testActivitiServiceTaskSuccess(CheckBusinessObjectDataAvailabilityCollection.class.getCanonicalName(), fieldExtensionList, parameters, variableValuesToValidate);
}
use of org.activiti.bpmn.model.FieldExtension in project herd by FINRAOS.
the class CheckBusinessObjectDataAvailabilityMultiplePartitionsTest method testCheckBusinessObjectDataAvailabilityMultiplePartitionsJson.
@Test
public void testCheckBusinessObjectDataAvailabilityMultiplePartitionsJson() throws Exception {
// Prepare test data.
businessObjectDataAvailabilityTestHelper.createDatabaseEntitiesForBusinessObjectDataAvailabilityTesting(null);
// Prepare a check business object data availability request.
BusinessObjectDataAvailabilityRequest businessObjectDataAvailabilityRequest = businessObjectDataServiceTestHelper.getTestBusinessObjectDataAvailabilityRequest(UNSORTED_PARTITION_VALUES);
List<FieldExtension> fieldExtensionList = new ArrayList<>();
fieldExtensionList.add(buildFieldExtension("contentType", "${contentType}"));
fieldExtensionList.add(buildFieldExtension("businessObjectDataAvailabilityRequest", "${businessObjectDataAvailabilityRequest}"));
List<Parameter> parameters = new ArrayList<>();
parameters.add(buildParameter("contentType", "json"));
parameters.add(buildParameter("businessObjectDataAvailabilityRequest", jsonHelper.objectToJson(businessObjectDataAvailabilityRequest)));
Map<String, Object> variableValuesToValidate = new HashMap<>();
variableValuesToValidate.put(CheckBusinessObjectDataAvailabilityMultiplePartitions.VARIABLE_IS_ALL_DATA_AVAILABLE, false);
variableValuesToValidate.put(BaseJavaDelegate.VARIABLE_JSON_RESPONSE, VARIABLE_VALUE_NOT_NULL);
testActivitiServiceTaskSuccess(CheckBusinessObjectDataAvailabilityMultiplePartitions.class.getCanonicalName(), fieldExtensionList, parameters, variableValuesToValidate);
}
Aggregations