use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet in project kie-wb-common by kiegroup.
the class CallActivityConverterTest method setUp.
@Before
public void setUp() {
final ReusableSubprocess definition = new ReusableSubprocess(new BPMNGeneralSet(), new ReusableSubprocessTaskExecutionSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new AdvancedData());
final View<ReusableSubprocess> view = new ViewImpl<>(definition, Bounds.create());
Node<View<ReusableSubprocess>, Edge> node = new NodeImpl<>(UUID);
node.setContent(view);
when(callActivity.getId()).thenReturn(UUID);
when(callActivity.getCalledElement()).thenReturn(CALLED_ELEMENT);
when(factoryManager.newNode(eq(UUID), eq(ReusableSubprocess.class))).thenReturn(node);
when(propertyReaderFactory.of(callActivity)).thenReturn(propertyReader);
when(propertyReader.getName()).thenReturn(NAME);
when(propertyReader.getDocumentation()).thenReturn(DOCUMENTATION);
when(propertyReader.getAssignmentsInfo()).thenReturn(ASSIGNMENTS_INFO);
when(propertyReader.getBounds()).thenReturn(BOUNDS);
when(propertyReader.getSimulationSet()).thenReturn(SIMULATION_SET);
when(propertyReader.getRectangleDimensionsSet()).thenReturn(RECTANGLE_DIMENSIONS_SET);
when(propertyReader.getFontSet()).thenReturn(FONT_SET);
when(propertyReader.getBackgroundSet()).thenReturn(BACKGROUND_SET);
when(propertyReader.isIndependent()).thenReturn(INDEPENDENT);
when(propertyReader.isAbortParent()).thenReturn(ABORT_PARENT);
when(propertyReader.isWaitForCompletion()).thenReturn(WAIT_FOR_COMPLETION);
when(propertyReader.isAsync()).thenReturn(IS_ASYNC);
when(propertyReader.isSequential()).thenReturn(SEQUENTIAL);
when(propertyReader.getCollectionOutput()).thenReturn(COLLECTION_OUTPUT);
when(propertyReader.getCollectionInput()).thenReturn(COLLECTION_INPUT);
when(propertyReader.getDataInput()).thenReturn(DATA_INPUT);
when(propertyReader.getDataOutput()).thenReturn(DATA_OUTPUT);
when(propertyReader.getCompletionCondition()).thenReturn(COMPLETION_CONDITION);
when(propertyReader.getOnEntryAction()).thenReturn(ON_ENTRY_ACTION);
when(propertyReader.getOnExitAction()).thenReturn(ON_EXIT_ACTION);
when(propertyReader.getSlaDueDate()).thenReturn(SLA_DUE_DATE);
converter = new CallActivityConverter(factoryManager, propertyReaderFactory);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet in project kie-wb-common by kiegroup.
the class ReusableSubprocessConverterTest method setUp.
@Before
public void setUp() {
when(propertyWriterFactory.of(any(CallActivity.class))).thenReturn(propertyWriter);
DataIOSet ioSet = mock(DataIOSet.class);
when(ioSet.getAssignmentsinfo()).thenReturn(ASSIGNMENTS_INFO);
final ReusableSubprocess definition = new ReusableSubprocess(new BPMNGeneralSet(NAME, DOCUMENTATION), new ReusableSubprocessTaskExecutionSet(new CalledElement(CALLED_ELEMENT), new IsCase(IS_CASE), new Independent(INDEPENDENT), new AbortParent(ABORT_PARENT), new WaitForCompletion(WAIT_FOR_COMPLETION), new IsAsync(IS_ASYNC), new AdHocAutostart(IS_ADHOC_AUTOSTART), new IsMultipleInstance(IS_MULTIPLE_INSTANCE), new MultipleInstanceExecutionMode(SEQUENTIAL), new MultipleInstanceCollectionInput(COLLECTION_INPUT), new MultipleInstanceDataInput(DATA_INPUT), new MultipleInstanceCollectionOutput(COLLECTION_OUTPUT), new MultipleInstanceDataOutput(DATA_OUTPUT), new MultipleInstanceCompletionCondition(COMPLETION_CONDITION), ON_ENTRY_ACTION, ON_EXIT_ACTION, new SLADueDate(SLA_DUE_DATE)), ioSet, new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), SIMULATION_SET, new AdvancedData());
final View<BaseReusableSubprocess> view = new ViewImpl<>(definition, BOUNDS);
node = new NodeImpl<>(UUID);
node.setContent(view);
converter = new ReusableSubprocessConverter(propertyWriterFactory);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet in project kie-wb-common by kiegroup.
the class GenericServiceTaskTest method setAndGetExecutionSet.
@Test
public void setAndGetExecutionSet() {
GenericServiceTask genericServiceTask = new GenericServiceTask(new TaskGeneralSet(new Name("Service Task"), new Documentation("")), new GenericServiceTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.SERVICE_TASK), new AdvancedData());
assertEquals(new GenericServiceTaskExecutionSet(), genericServiceTask.getExecutionSet());
GenericServiceTaskExecutionSet set = new GenericServiceTaskExecutionSet();
genericServiceTask.setExecutionSet(set);
assertEquals(set, genericServiceTask.getExecutionSet());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet in project kie-wb-common by kiegroup.
the class IntermediateErrorEventCatchingTest method setUp.
@Before
public void setUp() {
general = mock(BPMNGeneralSet.class);
backgroundSet = mock(BackgroundSet.class);
fontSet = mock(FontSet.class);
dimensionSet = mock(CircleDimensionSet.class);
dataIOSet = mock(DataIOSet.class);
advancedData = new AdvancedData();
cancellingErrorEventExecutionSet = mock(CancellingErrorEventExecutionSet.class);
tested = new IntermediateErrorEventCatching(general, backgroundSet, fontSet, dimensionSet, dataIOSet, advancedData, cancellingErrorEventExecutionSet);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet in project kie-wb-common by kiegroup.
the class DataObjectTest method testNotEquals.
@Test
public void testNotEquals() {
DataObject dataObject1 = new DataObject();
DataObject dataObject2 = new DataObject();
dataObject1.setName(new Name("dataObject1"));
dataObject2.setName(new Name("dataObject2"));
// Test Name
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setName(new Name("dataObject1"));
assertEquals(dataObject1, dataObject2);
// Test Type
DataObjectType dataObjectType = new DataObjectType();
dataObjectType.setValue(new DataObjectTypeValue("someType"));
dataObject2.setType(dataObjectType);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setType(new DataObjectType());
assertEquals(dataObject1, dataObject2);
// Test General Set
BPMNGeneralSet generalSet = new BPMNGeneralSet();
generalSet.setName(new Name("someName"));
dataObject2.setGeneral(generalSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setGeneral(new BPMNGeneralSet());
assertEquals(dataObject1, dataObject2);
// Test Background Set
BackgroundSet backgroundSet = new BackgroundSet();
backgroundSet.setBgColor(new BgColor("Black"));
dataObject2.setBackgroundSet(backgroundSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setBackgroundSet(new BackgroundSet());
assertEquals(dataObject1, dataObject2);
// Test Font Set
FontSet fontSet = new FontSet();
fontSet.setFontSize(new FontSize(11.0));
dataObject2.setFontSet(fontSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setFontSet(new FontSet());
assertEquals(dataObject1, dataObject2);
// Test Dimension Set
RectangleDimensionsSet rectangleDimensionsSet = new RectangleDimensionsSet(100.0, 100.0);
dataObject2.setDimensionsSet(rectangleDimensionsSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setDimensionsSet(new RectangleDimensionsSet());
assertEquals(dataObject1, dataObject2);
}
Aggregations