use of org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testEndEscalationEventEqualsAndHashCode.
@Test
public void testEndEscalationEventEqualsAndHashCode() {
String ESCALATION_REF = "ESCALATION_REF";
String ESCALATION_REF_1 = "ESCALATION_REF_1";
TestCaseBuilder.newTestCase().addTrueCase(new EndEscalationEvent(), new EndEscalationEvent()).addTrueCase(new EndEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet())).addFalseCase(new EndEscalationEvent(), null).addTrueCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet())).addTrueCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF_1)), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet("data"))).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(null), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), null, new DataIOSet())).test();
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testIntermediateCompensationThrowingEventEqualsAndHashCode.
@Test
public void testIntermediateCompensationThrowingEventEqualsAndHashCode() {
String ACTIVITY_REF = "ACTIVITY_REF";
String ACTIVITY_REF_1 = "ACTIVITY_REF_1";
TestCaseBuilder.newTestCase().addTrueCase(new IntermediateCompensationEventThrowing(), new IntermediateCompensationEventThrowing()).addTrueCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet()), new IntermediateCompensationEventThrowing(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet())).addFalseCase(new IntermediateCompensationEventThrowing(), null).addTrueCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet()), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet())).addTrueCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF_1)))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(null))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), null)).test();
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testEndCompensationEventEqualsAndHashCode.
@Test
public void testEndCompensationEventEqualsAndHashCode() {
String ACTIVITY_REF = "ACTIVITY_REF";
String ACTIVITY_REF_1 = "ACTIVITY_REF_1";
TestCaseBuilder.newTestCase().addTrueCase(new EndCompensationEvent(), new EndCompensationEvent()).addTrueCase(new EndCompensationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet()), new EndCompensationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet())).addFalseCase(new EndCompensationEvent(), null).addTrueCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet()), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet())).addTrueCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF_1)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF_1)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(null))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), null)).test();
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet 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.font.FontSet in project kie-wb-common by kiegroup.
the class BasePropertyReader method getFontSet.
@Override
public FontSet getFontSet() {
final FontFamily fontFamily = new FontFamily();
final FontColor fontColor = new FontColor(optionalAttribute("fontcolor").orElse(colorsDefaultFont()));
final FontSize fontSize = new FontSize(optionalAttribute("fontsize").map(Double::parseDouble).orElse(null));
final FontBorderSize fontBorderSize = new FontBorderSize();
final FontBorderColor fontBorderColor = new FontBorderColor();
return new FontSet(fontFamily, fontColor, fontSize, fontBorderSize, fontBorderColor);
}
Aggregations