Search in sources :

Example 1 with FontSet

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();
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) EscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) Test(org.junit.Test)

Example 2 with FontSet

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();
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) ActivityRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet) Test(org.junit.Test)

Example 3 with FontSet

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();
}
Also used : FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) ActivityRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet) Test(org.junit.Test)

Example 4 with FontSet

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);
}
Also used : NodeImpl(org.kie.workbench.common.stunner.core.graph.impl.NodeImpl) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) RectangleDimensionsSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) SimulationSet(org.kie.workbench.common.stunner.bpmn.definition.property.simulation.SimulationSet) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) ReusableSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ReusableSubprocessTaskExecutionSet) Edge(org.kie.workbench.common.stunner.core.graph.Edge) Before(org.junit.Before)

Example 5 with FontSet

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);
}
Also used : FontFamily(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontFamily) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) FontSize(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSize) FontColor(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontColor) FontBorderColor(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontBorderColor) FontBorderSize(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontBorderSize)

Aggregations

FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)14 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)12 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)11 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)11 Test (org.junit.Test)9 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)8 CircleDimensionSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet)7 RectangleDimensionsSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet)5 Before (org.junit.Before)4 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)4 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)4 CancellingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet)3 InterruptingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet)3 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3 SimulationSet (org.kie.workbench.common.stunner.bpmn.definition.property.simulation.SimulationSet)3 ReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess)2 ActivityRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef)2 CompensationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)2