target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void getCategory() { assertNotNull(tested.getCategory()); } | public String getCategory() { return category; } | BaseArtifacts implements BPMNViewDefinition { public String getCategory() { return category; } } | BaseArtifacts implements BPMNViewDefinition { public String getCategory() { return category; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDimensionsSet dimen... | BaseArtifacts implements BPMNViewDefinition { public String getCategory() { return category; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDimensionsSet dimen... | BaseArtifacts implements BPMNViewDefinition { public String getCategory() { return category; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDimensionsSet dimen... |
@Test public void getBackgroundSet() { assertNotNull(tested.getBackgroundSet()); } | public BackgroundSet getBackgroundSet() { return backgroundSet; } | BaseArtifacts implements BPMNViewDefinition { public BackgroundSet getBackgroundSet() { return backgroundSet; } } | BaseArtifacts implements BPMNViewDefinition { public BackgroundSet getBackgroundSet() { return backgroundSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDi... | BaseArtifacts implements BPMNViewDefinition { public BackgroundSet getBackgroundSet() { return backgroundSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDi... | BaseArtifacts implements BPMNViewDefinition { public BackgroundSet getBackgroundSet() { return backgroundSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDi... |
@Test public void getFontSet() { assertNotNull(tested.getFontSet()); } | public FontSet getFontSet() { return fontSet; } | BaseArtifacts implements BPMNViewDefinition { public FontSet getFontSet() { return fontSet; } } | BaseArtifacts implements BPMNViewDefinition { public FontSet getFontSet() { return fontSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDimensionsSet dimens... | BaseArtifacts implements BPMNViewDefinition { public FontSet getFontSet() { return fontSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDimensionsSet dimens... | BaseArtifacts implements BPMNViewDefinition { public FontSet getFontSet() { return fontSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") RectangleDimensionsSet dimens... |
@Test public void getDimensionsSet() { assertNotNull(tested.getDimensionsSet()); } | public RectangleDimensionsSet getDimensionsSet() { return dimensionsSet; } | BaseArtifacts implements BPMNViewDefinition { public RectangleDimensionsSet getDimensionsSet() { return dimensionsSet; } } | BaseArtifacts implements BPMNViewDefinition { public RectangleDimensionsSet getDimensionsSet() { return dimensionsSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") Re... | BaseArtifacts implements BPMNViewDefinition { public RectangleDimensionsSet getDimensionsSet() { return dimensionsSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") Re... | BaseArtifacts implements BPMNViewDefinition { public RectangleDimensionsSet getDimensionsSet() { return dimensionsSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") Re... |
@Test public void setBackgroundSet() { BackgroundSet backgroundSet = new BackgroundSet(); tested.setBackgroundSet(backgroundSet); assertEquals(backgroundSet, tested.getBackgroundSet()); } | public void setBackgroundSet(final BackgroundSet backgroundSet) { this.backgroundSet = backgroundSet; } | BaseArtifacts implements BPMNViewDefinition { public void setBackgroundSet(final BackgroundSet backgroundSet) { this.backgroundSet = backgroundSet; } } | BaseArtifacts implements BPMNViewDefinition { public void setBackgroundSet(final BackgroundSet backgroundSet) { this.backgroundSet = backgroundSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
fina... | BaseArtifacts implements BPMNViewDefinition { public void setBackgroundSet(final BackgroundSet backgroundSet) { this.backgroundSet = backgroundSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
fina... | BaseArtifacts implements BPMNViewDefinition { public void setBackgroundSet(final BackgroundSet backgroundSet) { this.backgroundSet = backgroundSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
fina... |
@Test public void setFontSet() { FontSet fontSet = new FontSet(); tested.setFontSet(fontSet); assertEquals(fontSet, tested.getFontSet()); } | public void setFontSet(final FontSet fontSet) { this.fontSet = fontSet; } | BaseArtifacts implements BPMNViewDefinition { public void setFontSet(final FontSet fontSet) { this.fontSet = fontSet; } } | BaseArtifacts implements BPMNViewDefinition { public void setFontSet(final FontSet fontSet) { this.fontSet = fontSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") Rec... | BaseArtifacts implements BPMNViewDefinition { public void setFontSet(final FontSet fontSet) { this.fontSet = fontSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") Rec... | BaseArtifacts implements BPMNViewDefinition { public void setFontSet(final FontSet fontSet) { this.fontSet = fontSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
final @MapsTo("dimensionsSet") Rec... |
@Test public void setDimensionsSet() { RectangleDimensionsSet dimensionsSet = new RectangleDimensionsSet(); tested.setDimensionsSet(dimensionsSet); assertEquals(dimensionsSet, tested.getDimensionsSet()); } | public void setDimensionsSet(final RectangleDimensionsSet dimensionsSet) { this.dimensionsSet = dimensionsSet; } | BaseArtifacts implements BPMNViewDefinition { public void setDimensionsSet(final RectangleDimensionsSet dimensionsSet) { this.dimensionsSet = dimensionsSet; } } | BaseArtifacts implements BPMNViewDefinition { public void setDimensionsSet(final RectangleDimensionsSet dimensionsSet) { this.dimensionsSet = dimensionsSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
... | BaseArtifacts implements BPMNViewDefinition { public void setDimensionsSet(final RectangleDimensionsSet dimensionsSet) { this.dimensionsSet = dimensionsSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
... | BaseArtifacts implements BPMNViewDefinition { public void setDimensionsSet(final RectangleDimensionsSet dimensionsSet) { this.dimensionsSet = dimensionsSet; } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsTo("fontSet") FontSet fontSet,
... |
@Test public void testHashCode() { assertNotEquals(new DataObject().hashCode(), tested.hashCode()); assertNotEquals(new TextAnnotation().hashCode(), tested.hashCode()); } | @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(backgroundSet), Objects.hashCode(fontSet), Objects.hashCode(dimensionsSet)); } | BaseArtifacts implements BPMNViewDefinition { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(backgroundSet), Objects.hashCode(fontSet), Objects.hashCode(dimensionsSet)); } } | BaseArtifacts implements BPMNViewDefinition { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(backgroundSet), Objects.hashCode(fontSet), Objects.hashCode(dimensionsSet)); } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsT... | BaseArtifacts implements BPMNViewDefinition { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(backgroundSet), Objects.hashCode(fontSet), Objects.hashCode(dimensionsSet)); } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsT... | BaseArtifacts implements BPMNViewDefinition { @Override public int hashCode() { return HashUtil.combineHashCodes(Objects.hashCode(backgroundSet), Objects.hashCode(fontSet), Objects.hashCode(dimensionsSet)); } BaseArtifacts(final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
final @MapsT... |
@Test public void testAddChild() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("uuid").build(); final DecisionNavigatorItem child = new DecisionNavigatorItemBuilder().withUUID("child").build(); final TreeSet<DecisionNavigatorItem> expectedChildren = new TreeSet<DecisionNavigatorItem>(... | public void addChild(final DecisionNavigatorItem item) { removeChild(item); getChildren().add(item); item.setParentUUID(uuid); } | DecisionNavigatorItem implements Comparable { public void addChild(final DecisionNavigatorItem item) { removeChild(item); getChildren().add(item); item.setParentUUID(uuid); } } | DecisionNavigatorItem implements Comparable { public void addChild(final DecisionNavigatorItem item) { removeChild(item); getChildren().add(item); item.setParentUUID(uuid); } } | DecisionNavigatorItem implements Comparable { public void addChild(final DecisionNavigatorItem item) { removeChild(item); getChildren().add(item); item.setParentUUID(uuid); } String getUUID(); String getLabel(); Type getType(); TreeSet<DecisionNavigatorItem> getChildren(); Optional<Command> getOnClick(); String getPar... | DecisionNavigatorItem implements Comparable { public void addChild(final DecisionNavigatorItem item) { removeChild(item); getChildren().add(item); item.setParentUUID(uuid); } String getUUID(); String getLabel(); Type getType(); TreeSet<DecisionNavigatorItem> getChildren(); Optional<Command> getOnClick(); String getPar... |
@Test public void testEquals() { assertTrue(tested.equals(new DataObject())); assertFalse(tested.equals("")); final DataObject dataObject = new DataObject(); BgColor color = new BgColor(); color.setValue("Black"); dataObject.getBackgroundSet().setBgColor(color); assertFalse(tested.equals(dataObject)); tested.getBackgro... | @Override public boolean equals(Object o) { if (o instanceof BaseArtifacts) { BaseArtifacts other = (BaseArtifacts) o; return Objects.equals(backgroundSet, other.backgroundSet) && Objects.equals(fontSet, other.fontSet) && Objects.equals(dimensionsSet, other.dimensionsSet); } return false; } | BaseArtifacts implements BPMNViewDefinition { @Override public boolean equals(Object o) { if (o instanceof BaseArtifacts) { BaseArtifacts other = (BaseArtifacts) o; return Objects.equals(backgroundSet, other.backgroundSet) && Objects.equals(fontSet, other.fontSet) && Objects.equals(dimensionsSet, other.dimensionsSet); ... | BaseArtifacts implements BPMNViewDefinition { @Override public boolean equals(Object o) { if (o instanceof BaseArtifacts) { BaseArtifacts other = (BaseArtifacts) o; return Objects.equals(backgroundSet, other.backgroundSet) && Objects.equals(fontSet, other.fontSet) && Objects.equals(dimensionsSet, other.dimensionsSet); ... | BaseArtifacts implements BPMNViewDefinition { @Override public boolean equals(Object o) { if (o instanceof BaseArtifacts) { BaseArtifacts other = (BaseArtifacts) o; return Objects.equals(backgroundSet, other.backgroundSet) && Objects.equals(fontSet, other.fontSet) && Objects.equals(dimensionsSet, other.dimensionsSet); ... | BaseArtifacts implements BPMNViewDefinition { @Override public boolean equals(Object o) { if (o instanceof BaseArtifacts) { BaseArtifacts other = (BaseArtifacts) o; return Objects.equals(backgroundSet, other.backgroundSet) && Objects.equals(fontSet, other.fontSet) && Objects.equals(dimensionsSet, other.dimensionsSet); ... |
@Test public void testInit() { final List<DefinitionSetService> definitionSetServices = new LinkedList<>(); final DefinitionSetService definitionSetService1 = mock(DefinitionSetService.class); final DefinitionSetService definitionSetService2 = mock(DefinitionSetService.class); definitionSetServices.add(definitionSetSer... | @PostConstruct public void init() { definitionSetServiceInstances.forEach(i -> definitionSetServices.add(i)); } | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @PostConstruct public void init() { definitionSetServiceInstances.forEach(i -> definitionSetServices.add(i)); } } | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @PostConstruct public void init() { definitionSetServiceInstances.forEach(i -> definitionSetServices.add(i)); } @Inject CaseManagementSwitchViewServiceImpl(final FactoryManager factoryManager,
... | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @PostConstruct public void init() { definitionSetServiceInstances.forEach(i -> definitionSetServices.add(i)); } @Inject CaseManagementSwitchViewServiceImpl(final FactoryManager factoryManager,
... | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @PostConstruct public void init() { definitionSetServiceInstances.forEach(i -> definitionSetServices.add(i)); } @Inject CaseManagementSwitchViewServiceImpl(final FactoryManager factoryManager,
... |
@Test public void testSwitchView() throws IOException { final DefinitionSetService definitionSetService1 = mock(DefinitionSetService.class); String defSetId = "defSetId"; when(definitionSetService1.accepts(eq(defSetId))).thenReturn(true); tested.definitionSetServices.add(definitionSetService1); final DiagramMarshaller ... | @Override @SuppressWarnings("unchecked") public Optional<ProjectDiagram> switchView(final Diagram diagram, final String mappedDefSetId, final String mappedShapeSetId) { final Metadata metadata = diagram.getMetadata(); final String defSetId = metadata.getDefinitionSetId(); final Optional<DefinitionSetService> definition... | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @Override @SuppressWarnings("unchecked") public Optional<ProjectDiagram> switchView(final Diagram diagram, final String mappedDefSetId, final String mappedShapeSetId) { final Metadata metadata = diagram.getMetadata(); final String defSetId... | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @Override @SuppressWarnings("unchecked") public Optional<ProjectDiagram> switchView(final Diagram diagram, final String mappedDefSetId, final String mappedShapeSetId) { final Metadata metadata = diagram.getMetadata(); final String defSetId... | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @Override @SuppressWarnings("unchecked") public Optional<ProjectDiagram> switchView(final Diagram diagram, final String mappedDefSetId, final String mappedShapeSetId) { final Metadata metadata = diagram.getMetadata(); final String defSetId... | CaseManagementSwitchViewServiceImpl implements CaseManagementSwitchViewService { @Override @SuppressWarnings("unchecked") public Optional<ProjectDiagram> switchView(final Diagram diagram, final String mappedDefSetId, final String mappedShapeSetId) { final Metadata metadata = diagram.getMetadata(); final String defSetId... |
@Test public void assertDiagamType() { factory.init(); verify(bpmnDiagramFactory, times(1)).setDiagramType(eq(CaseManagementDiagram.class)); } | @PostConstruct public void init() { this.bpmnDiagramFactory.setDiagramType(CaseManagementDiagram.class); } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @PostConstruct public void init() { this.bpmnDiagramFactory.setDiagramType(CaseManagementDiagram.class); } } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @PostConstruct public void init() { this.bpmnDiagramFactory.setDiagramType(CaseManagementDiagram.class); } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjec... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @PostConstruct public void init() { this.bpmnDiagramFactory.setDiagramType(CaseManagementDiagram.class); } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjec... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @PostConstruct public void init() { this.bpmnDiagramFactory.setDiagramType(CaseManagementDiagram.class); } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjec... |
@Test public void assertDefinitionSetType() { assertEquals(CaseManagementDefinitionSet.class, factory.getDefinitionSetType()); } | @Override protected Class<?> getDefinitionSetType() { return CaseManagementDefinitionSet.class; } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override protected Class<?> getDefinitionSetType() { return CaseManagementDefinitionSet.class; } } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override protected Class<?> getDefinitionSetType() { return CaseManagementDefinitionSet.class; } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjectDiagramF... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override protected Class<?> getDefinitionSetType() { return CaseManagementDefinitionSet.class; } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjectDiagramF... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override protected Class<?> getDefinitionSetType() { return CaseManagementDefinitionSet.class; } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjectDiagramF... |
@Test public void assertMetadataType() { assertEquals(ProjectMetadata.class, factory.getMetadataType()); } | @Override public Class<? extends Metadata> getMetadataType() { return ProjectMetadata.class; } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public Class<? extends Metadata> getMetadataType() { return ProjectMetadata.class; } } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public Class<? extends Metadata> getMetadataType() { return ProjectMetadata.class; } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjectDiagramFact... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public Class<? extends Metadata> getMetadataType() { return ProjectMetadata.class; } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjectDiagramFact... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public Class<? extends Metadata> getMetadataType() { return ProjectMetadata.class; } protected CaseManagementProjectDiagramFactory(); @Inject CaseManagementProjectDiagramFactory(final BPMNProjectDiagramFact... |
@Test @SuppressWarnings("unchecked") public void testBuild() { factory.init(); factory.build("diagram1", metadata, graph); verify(bpmnDiagramFactory, times(1)).build(eq("diagram1"), eq(metadata), eq(graph)); } | @Override public ProjectDiagram build(final String name, final ProjectMetadata metadata, final Graph<DefinitionSet, ?> graph) { return bpmnDiagramFactory.build(name, metadata, graph); } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public ProjectDiagram build(final String name, final ProjectMetadata metadata, final Graph<DefinitionSet, ?> graph) { return bpmnDiagramFactory.build(name, metadata, graph); } } | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public ProjectDiagram build(final String name, final ProjectMetadata metadata, final Graph<DefinitionSet, ?> graph) { return bpmnDiagramFactory.build(name, metadata, graph); } protected CaseManagementProject... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public ProjectDiagram build(final String name, final ProjectMetadata metadata, final Graph<DefinitionSet, ?> graph) { return bpmnDiagramFactory.build(name, metadata, graph); } protected CaseManagementProject... | CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public ProjectDiagram build(final String name, final ProjectMetadata metadata, final Graph<DefinitionSet, ?> graph) { return bpmnDiagramFactory.build(name, metadata, graph); } protected CaseManagementProject... |
@Test public void testBuild_rectangle() throws Exception { final SVGShapeView shapeView = tested.build("rectangle", new SVGPrimitiveShape(new Rectangle(0d, 0d)), 10d, 10d, false); assertTrue(shapeView instanceof CaseManagementDiagramShapeView); } | @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, width, height, false); case "rectangle": return new CaseManagemen... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... |
@Test public void testBuild_stage() throws Exception { final SVGShapeView shapeView = tested.build("stage", new SVGPrimitiveShape(new Rectangle(0d, 0d)), 10d, 10d, false); assertTrue(shapeView instanceof CaseManagementStageShapeView); } | @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, width, height, false); case "rectangle": return new CaseManagemen... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... |
@Test public void testBuild_subcase() throws Exception { final SVGShapeView shapeView = tested.build("subcase", new SVGPrimitiveShape(new Rectangle(0d, 0d)), 10d, 10d, false); assertTrue(shapeView instanceof CaseManagementShapeView); } | @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, width, height, false); case "rectangle": return new CaseManagemen... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... |
@Test public void testCompareToWhenObjectIsNotADecisionNavigatorItem() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").build(); final Object object = null; final int result = item.compareTo(object); assertTrue(result > 0); } | @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } } | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... |
@Test public void testBuild_subprocess() throws Exception { final SVGShapeView shapeView = tested.build("subprocess", new SVGPrimitiveShape(new Rectangle(0d, 0d)), 10d, 10d, false); assertTrue(shapeView instanceof CaseManagementShapeView); } | @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, width, height, false); case "rectangle": return new CaseManagemen... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... |
@Test public void testBuild_task() throws Exception { final SVGShapeView shapeView = tested.build("task", new SVGPrimitiveShape(new Rectangle(0d, 0d)), 10d, 10d, false); assertTrue(shapeView instanceof CaseManagementShapeView); } | @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, width, height, false); case "rectangle": return new CaseManagemen... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... | CaseManagementSVGViewBuilder implements SVGShapeViewBuilder { @Override public SVGShapeView build(final String name, final SVGPrimitiveShape primitiveShape, final double width, final double height, final boolean resizable) { switch (name) { case "stage": return new CaseManagementStageShapeView(name, primitiveShape, wid... |
@Test public void create() { CaseManagementShape shape = CaseManagementShapeCommand.create(def, shapeView, shapeDef); verify(shapeDef).fontHandler(); verify(shapeView).setTitlePosition(HasTitle.VerticalAlignment.MIDDLE, HasTitle.HorizontalAlignment.CENTER, HasTitle.ReferencePosition.INSIDE, HasTitle.Orientation.HORIZON... | public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); return command.configure(shapeV... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... |
@Test public void create_noShape() { CaseManagementShapeCommand.create(new Object(), shapeView, shapeDef); verify(shapeDef, never()).fontHandler(); verify(shapeView, never()).setTitlePosition(any(HasTitle.VerticalAlignment.class), any(HasTitle.HorizontalAlignment.class), any(HasTitle.ReferencePosition.class), any(HasTi... | public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); return command.configure(shapeV... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... | CaseManagementShapeCommand { public static CaseManagementShape create(Object definition, CaseManagementShapeView shapeView, CaseManagementSvgShapeDef shapeDef) { Command command = CM_SHAPE_TYPES.get(definition.getClass()); if (command == null) { return null; } applyShapeViewHandlers(definition, shapeView, shapeDef); re... |
@Test public void checkLogicalReplacementWithOneChild() { final CaseManagementShapeView child = createShapeView("child"); final CaseManagementShapeView replacement = createShapeView("replacement"); shape.add(child); verify(layoutHandler, times(1)).requestLayout(shape); assertEquals(1, shape.getChildShapes().size()); as... | public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(original); if (index < 0) { return; } getChildShapes().set(index, replacement); getContainer(... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... |
@Test public void checkLogicalReplacementWithMultipleChildren() { final CaseManagementShapeView child1 = createShapeView("child1"); final CaseManagementShapeView child2 = createShapeView("child2"); final CaseManagementShapeView replacement = createShapeView("replacement"); shape.add(child1); shape.add(child2); verify(l... | public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(original); if (index < 0) { return; } getChildShapes().set(index, replacement); getContainer(... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement) { if (original == null || replacement == null || replacement.getParent() == this) { return; } int index = getIndex(origi... |
@Test public void checkAddShapeAtIndex0WithNoExistingChildren() { final CaseManagementShapeView child = createShapeView("child"); shape.addShape(child, 0); verify(layoutHandler, times(1)).requestLayout(shape); assertEquals(1, shape.getChildShapes().size()); assertEquals(child, shape.getChildShapes().get(0)); } | public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); childShapes.forEach(WiresShape::removeFromParent); final List<WiresShape> existingChildShapes... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... |
@Test public void checkAddShapeAtIndex1WithNoExistingChildren() { final CaseManagementShapeView child = createShapeView("child"); shape.addShape(child, 1); verify(layoutHandler, never()).requestLayout(shape); assertEquals(0, shape.getChildShapes().size()); } | public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); childShapes.forEach(WiresShape::removeFromParent); final List<WiresShape> existingChildShapes... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... |
@Test public void checkAddShapeAtNegativeIndexWithNoExistingChildren() { final CaseManagementShapeView child = createShapeView("child"); shape.addShape(child, -1); verify(layoutHandler, never()).requestLayout(shape); assertEquals(0, shape.getChildShapes().size()); } | public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); childShapes.forEach(WiresShape::removeFromParent); final List<WiresShape> existingChildShapes... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... |
@Test public void testGetIndex() throws Exception { final CaseManagementShapeView child1 = createShapeView("child1"); final CaseManagementShapeView child2 = createShapeView("child2"); shape.add(child1); shape.add(child2); assertEquals(shape.getIndex(child1), 0); assertEquals(shape.getIndex(child2), 1); } | public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSame(shape, child)) { return i; } } return -1; } | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSam... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSam... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSam... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSam... |
@Test public void testCompareToWhenItemAndObjectAreEqual() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("123").build(); final int result = item.compareTo(object); assertEquals(0, result); } | @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } } | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... |
@Test public void testGetGhost() throws Exception { final CaseManagementShapeView child = createShapeView("child"); shape.add(child); final CaseManagementShapeView ghost = shape.getGhost(); assertTrue(ILayoutHandler.NONE.equals(ghost.getLayoutHandler())); assertEquals(ghost.getUUID(), shape.getUUID()); assertTrue(ghost... | public CaseManagementShapeView getGhost() { final CaseManagementShapeView ghost = createGhost(); if (null != ghost) { ghost.setFillColor(ColorName.GRAY.getColorString()); ghost.setFillAlpha(0.5d); ghost.setStrokeAlpha(0.5d); ghost.setUUID(getUUID()); } return ghost; } | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public CaseManagementShapeView getGhost() { final CaseManagementShapeView ghost = createGhost(); if (null != ghost) { ghost.setFillColor(ColorName.GRAY.getColorString()); ghost.setFillAlpha(0.5d); ghost.setStrokeAlpha(0.5d); ghost.s... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public CaseManagementShapeView getGhost() { final CaseManagementShapeView ghost = createGhost(); if (null != ghost) { ghost.setFillColor(ColorName.GRAY.getColorString()); ghost.setFillAlpha(0.5d); ghost.setStrokeAlpha(0.5d); ghost.s... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public CaseManagementShapeView getGhost() { final CaseManagementShapeView ghost = createGhost(); if (null != ghost) { ghost.setFillColor(ColorName.GRAY.getColorString()); ghost.setFillAlpha(0.5d); ghost.setStrokeAlpha(0.5d); ghost.s... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public CaseManagementShapeView getGhost() { final CaseManagementShapeView ghost = createGhost(); if (null != ghost) { ghost.setFillColor(ColorName.GRAY.getColorString()); ghost.setFillAlpha(0.5d); ghost.setStrokeAlpha(0.5d); ghost.s... |
@Test public void testAddShape() throws Exception { final CaseManagementShapeView child1 = createShapeView("child1"); final CaseManagementShapeView child2 = createShapeView("child2"); final CaseManagementShapeView child3 = createShapeView("child2"); { shape.addShape(child1, 0); verify(shape, times(1)).add(child1); veri... | public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); childShapes.forEach(WiresShape::removeFromParent); final List<WiresShape> existingChildShapes... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... | CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public void addShape(final WiresShape shape, final int targetIndex) { if (shape == null || (targetIndex < 0 || targetIndex > getChildShapes().size())) { return; } final List<WiresShape> childShapes = getChildShapes().toList(); child... |
@Test public void testMakeDropZone() throws Exception { Optional<MultiPath> dropZone = tested.getDropZone(); assertTrue(dropZone.isPresent()); } | @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } } | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } CaseManagementStageShapeView(String name,
... | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } CaseManagementStageShapeView(String name,
... | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } CaseManagementStageShapeView(String name,
... |
@Test public void testGetDropZone() throws Exception { Optional<MultiPath> dropZone1 = tested.getDropZone(); when(canvas.getPanelBounds()).thenReturn(Optional.of(Bounds.build(0.0, 0.0, 0.0, 9999.0))); Optional<MultiPath> dropZone2 = tested.getDropZone(); assertNotEquals(dropZone1, dropZone2); } | @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } } | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } CaseManagementStageShapeView(String name,
... | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } CaseManagementStageShapeView(String name,
... | CaseManagementStageShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(b -> this.createDropZone(b.getHeight()))); return super.getDropZone(); } CaseManagementStageShapeView(String name,
... |
@Test public void testGetDropZone() throws Exception { Optional<MultiPath> dropZone1 = tested.getDropZone(); assertTrue(dropZone1.isPresent()); when(canvas.getPanelBounds()).thenReturn(Optional.of(Bounds.build(0.0, 0.0, 2000.0, 1000.0))); Optional<MultiPath> dropZone2 = tested.getDropZone(); assertTrue(dropZone2.isPres... | @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(this::createDropZone)); return super.getDropZone(); } | CaseManagementDiagramShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(this::createDropZone)); return super.getDropZone(); } } | CaseManagementDiagramShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(this::createDropZone)); return super.getDropZone(); } CaseManagementDiagramShapeView(String name,
... | CaseManagementDiagramShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(this::createDropZone)); return super.getDropZone(); } CaseManagementDiagramShapeView(String name,
... | CaseManagementDiagramShapeView extends CaseManagementShapeView { @Override public Optional<MultiPath> getDropZone() { this.getCanvas() .ifPresent(c -> c.getPanelBounds(). ifPresent(this::createDropZone)); return super.getDropZone(); } CaseManagementDiagramShapeView(String name,
... |
@Test public void testNewViewInstance() throws Exception { tested.newViewInstance(factory, new UserTask()); verify(factory, times(1)).task(); } | @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final UserTask obj) { return newViewInstance(Optional.empty(), Optional.empty(), factory.task()); } | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final UserTask obj) { return newViewInstance(Optional.empty(), Optional.empty(), factory.task()); } } | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final UserTask obj) { return newViewInstance(Optional.empty(), Optional.empty(), factory.task()); } } | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final UserTask obj) { return newViewInstance(Optional.empty(), Optional.empty(), factory.task()); } @Override S... | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final UserTask obj) { return newViewInstance(Optional.empty(), Optional.empty(), factory.task()); } @Override S... |
@Test public void testGetGlyph() throws Exception { Glyph glyph = tested.getGlyph(UserTask.class, ""); assertEquals(CaseManagementSVGGlyphFactory.TASK_GLYPH, glyph); } | @Override public Glyph getGlyph(final Class<? extends UserTask> type, final String defId) { return CaseManagementSVGGlyphFactory.TASK_GLYPH; } | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public Glyph getGlyph(final Class<? extends UserTask> type, final String defId) { return CaseManagementSVGGlyphFactory.TASK_GLYPH; } } | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public Glyph getGlyph(final Class<? extends UserTask> type, final String defId) { return CaseManagementSVGGlyphFactory.TASK_GLYPH; } } | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public Glyph getGlyph(final Class<? extends UserTask> type, final String defId) { return CaseManagementSVGGlyphFactory.TASK_GLYPH; } @Override SizeHandler<UserTask, SVGShapeView> newSizeHandler(... | CaseManagementSvgUserTaskShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<UserTask> { @Override public Glyph getGlyph(final Class<? extends UserTask> type, final String defId) { return CaseManagementSVGGlyphFactory.TASK_GLYPH; } @Override SizeHandler<UserTask, SVGShapeView> newSizeHandler(... |
@Test public void testNewViewInstance() throws Exception { tested.newViewInstance(factory, new AdHocSubprocess()); verify(factory, times(1)).stage(); } | @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); } | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... |
@Test public void testNewViewInstance_zeroDimension() throws Exception { final Width width = new Width(0.0); final Height height = new Height(0.0); final RectangleDimensionsSet dimensionsSet = new RectangleDimensionsSet(); dimensionsSet.setWidth(width); dimensionsSet.setHeight(height); final AdHocSubprocess adHocSubpro... | @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); } | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final AdHocSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), factory.stage()); }... |
@Test public void testGetGlyph() throws Exception { Glyph glyph = tested.getGlyph(AdHocSubprocess.class, ""); assertEquals(CaseManagementSVGGlyphFactory.STAGE_GLYPH, glyph); } | @Override public Glyph getGlyph(final Class<? extends AdHocSubprocess> type, final String defId) { return CaseManagementSVGGlyphFactory.STAGE_GLYPH; } | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public Glyph getGlyph(final Class<? extends AdHocSubprocess> type, final String defId) { return CaseManagementSVGGlyphFactory.STAGE_GLYPH; } } | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public Glyph getGlyph(final Class<? extends AdHocSubprocess> type, final String defId) { return CaseManagementSVGGlyphFactory.STAGE_GLYPH; } } | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public Glyph getGlyph(final Class<? extends AdHocSubprocess> type, final String defId) { return CaseManagementSVGGlyphFactory.STAGE_GLYPH; } @Override SizeHandler<AdHocSubprocess, SVGShapeVi... | CaseManagementSvgStageShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<AdHocSubprocess> { @Override public Glyph getGlyph(final Class<? extends AdHocSubprocess> type, final String defId) { return CaseManagementSVGGlyphFactory.STAGE_GLYPH; } @Override SizeHandler<AdHocSubprocess, SVGShapeVi... |
@Test public void testCompareToWhenItemOrderingNameIsGreaterThanObjectOrderingName() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").withLabel("Hat").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("456").withLabel("Red").build(); final int result = ite... | @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } } | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... |
@Test public void testNewViewInstance() throws Exception { tested.newViewInstance(factory, new CaseManagementDiagram()); verify(factory, times(1)).rectangle(); } | @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final CaseManagementDiagram diagram) { return newViewInstance(Optional.of(new Width(0d)), Optional.of(new Height(0d)), factory.rectangle()); } | CaseManagementSvgDiagramShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<CaseManagementDiagram> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final CaseManagementDiagram diagram) { return newViewInstance(Optional.of(new Width(0d)), Optional.o... | CaseManagementSvgDiagramShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<CaseManagementDiagram> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final CaseManagementDiagram diagram) { return newViewInstance(Optional.of(new Width(0d)), Optional.o... | CaseManagementSvgDiagramShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<CaseManagementDiagram> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final CaseManagementDiagram diagram) { return newViewInstance(Optional.of(new Width(0d)), Optional.o... | CaseManagementSvgDiagramShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<CaseManagementDiagram> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final CaseManagementDiagram diagram) { return newViewInstance(Optional.of(new Width(0d)), Optional.o... |
@Test public void testNewViewInstance() throws Exception { tested.newViewInstance(factory, new CaseReusableSubprocess()); verify(factory, times(1)).subcase(); tested.newViewInstance(factory, new ProcessReusableSubprocess()); verify(factory, times(1)).subprocess(); } | @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final ReusableSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), VIEW_RESOURCES.getResource(factory, bean)); } | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final ReusableSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), VIEW_RES... | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final ReusableSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), VIEW_RES... | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final ReusableSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), VIEW_RES... | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final ReusableSubprocess bean) { return newViewInstance(Optional.empty(), Optional.empty(), VIEW_RES... |
@Test public void testGetGlyph() throws Exception { Glyph subcaseGlyph = tested.getGlyph(CaseReusableSubprocess.class, ""); assertEquals(CaseManagementSVGGlyphFactory.SUBCASE_GLYPH, subcaseGlyph); Glyph subprocessGlyph = tested.getGlyph(ProcessReusableSubprocess.class, ""); assertEquals(CaseManagementSVGGlyphFactory.SU... | @Override public Glyph getGlyph(final Class<? extends ReusableSubprocess> type, final String defId) { return GLYPHS.get(type); } | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public Glyph getGlyph(final Class<? extends ReusableSubprocess> type, final String defId) { return GLYPHS.get(type); } } | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public Glyph getGlyph(final Class<? extends ReusableSubprocess> type, final String defId) { return GLYPHS.get(type); } } | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public Glyph getGlyph(final Class<? extends ReusableSubprocess> type, final String defId) { return GLYPHS.get(type); } @Override SizeHandler<ReusableSubprocess, SVGShapeView> newSize... | CaseManagementSvgSubprocessShapeDef extends BaseDimensionedShapeDef implements CaseManagementSvgShapeDef<ReusableSubprocess> { @Override public Glyph getGlyph(final Class<? extends ReusableSubprocess> type, final String defId) { return GLYPHS.get(type); } @Override SizeHandler<ReusableSubprocess, SVGShapeView> newSize... |
@Test public void testNewGraphCommand() { final Command graphCommand = command.newGraphCommand(canvasHandler); assertTrue(graphCommand instanceof CaseManagementSetChildNodeGraphCommand); final CaseManagementSetChildNodeGraphCommand cmGraphCommand = (CaseManagementSetChildNodeGraphCommand) graphCommand; assertTrue(cmGra... | @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent .map(p -> OptionalInt.of(getChildGraphIndex(p, getCandidate()))) .orElseGet(OptionalInt::empty); OptionalInt index = l... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... |
@Test public void testNewGraphCommand_moveForward() { final Node last = mock(Node.class); final Edge lEdge = mock(Edge.class); when(lEdge.getTargetNode()).thenReturn(last); parent.getOutEdges().add(lEdge); final Edge cEdge = mock(Edge.class); when(cEdge.getTargetNode()).thenReturn(candidate); parent.getOutEdges().add(c... | @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent .map(p -> OptionalInt.of(getChildGraphIndex(p, getCandidate()))) .orElseGet(OptionalInt::empty); OptionalInt index = l... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... |
@Test public void testNewGraphCommand_moveBackward() { final Edge cEdge = mock(Edge.class); when(cEdge.getTargetNode()).thenReturn(candidate); parent.getOutEdges().add(cEdge); final Node last = mock(Node.class); final Edge lEdge = mock(Edge.class); when(lEdge.getTargetNode()).thenReturn(last); parent.getOutEdges().add(... | @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent .map(p -> OptionalInt.of(getChildGraphIndex(p, getCandidate()))) .orElseGet(OptionalInt::empty); OptionalInt index = l... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... |
@Test public void testNewGraphCommand_addNew() { command = new CaseManagementSetChildCommand(parent, candidate, Optional.empty(), OptionalInt.empty(), Optional.empty(), null); final Command graphCommand = command.newGraphCommand(canvasHandler); assertTrue(graphCommand instanceof CaseManagementSetChildNodeGraphCommand);... | @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent .map(p -> OptionalInt.of(getChildGraphIndex(p, getCandidate()))) .orElseGet(OptionalInt::empty); OptionalInt index = l... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... |
@Test public void testNewGraphCommand_addNewStage() { final Node childNode = mock(Node.class); final View cContent = mock(View.class); when(childNode.getContent()).thenReturn(cContent); when(cContent.getDefinition()).thenReturn(mock(AdHocSubprocess.class)); when(childNode.getOutEdges()).thenReturn(new LinkedList()); fi... | @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent .map(p -> OptionalInt.of(getChildGraphIndex(p, getCandidate()))) .orElseGet(OptionalInt::empty); OptionalInt index = l... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... | CaseManagementSetChildCommand extends org.kie.workbench.common.stunner.core.client.canvas.command.SetChildrenCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) { OptionalInt originalIndex = originalParent... |
@Test public void checkGetFirstDiagramNodeWithEmptyGraph() { final Graph graph = new GraphImpl<>("uuid", new GraphNodeStoreImpl()); final Node<Definition<CaseManagementDiagram>, ?> fNode = CaseManagementCommandUtil.getFirstDiagramNode(graph); assertNull(fNode); } | @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } } | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } } | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> ge... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> ge... |
@Test @SuppressWarnings("unchecked") public void checkGetFirstDiagramNodeWithNonEmptyGraph() { final Graph graph = new GraphImpl<>("uuid", new GraphNodeStoreImpl()); final Node node = new NodeImpl<Definition>("node-uuid"); final CaseManagementDiagram content = new CaseManagementDiagram(); node.setContent(new Definition... | @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } } | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } } | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> ge... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph) { return GraphUtils.getFirstNode(graph, CaseManagementDiagram.class); } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> ge... |
@Test public void testCompareToWhenItemOrderingNameIsLessThanObjectOrderingName() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").withLabel("Red").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("456").withLabel("Hat").build(); final int result = item.c... | @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } } | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... | DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); ... |
@Test public void testGetDocumentByPathWithUnknownPath() { final Path path = mock(Path.class); when(path.toURI()).thenReturn(URI); when(ioService.newInputStream(any())).thenThrow(new NoSuchFileException()); final PMMLDocumentMetadata document = factory.getDocumentByPath(path); assertThat(document).isNotNull(); assertTh... | public PMMLDocumentMetadata getDocumentByPath(final Path path) { return Optional.ofNullable(loadPMMLInfo(path)).map(pmml -> convertPMMLInfo(path, pmml)).orElse(emptyPMMLDocumentMetadata(path)); } | PMMLIncludedDocumentFactory { public PMMLDocumentMetadata getDocumentByPath(final Path path) { return Optional.ofNullable(loadPMMLInfo(path)).map(pmml -> convertPMMLInfo(path, pmml)).orElse(emptyPMMLDocumentMetadata(path)); } } | PMMLIncludedDocumentFactory { public PMMLDocumentMetadata getDocumentByPath(final Path path) { return Optional.ofNullable(loadPMMLInfo(path)).map(pmml -> convertPMMLInfo(path, pmml)).orElse(emptyPMMLDocumentMetadata(path)); } PMMLIncludedDocumentFactory(); @Inject PMMLIncludedDocumentFactory(final @Named("ioStrategy")... | PMMLIncludedDocumentFactory { public PMMLDocumentMetadata getDocumentByPath(final Path path) { return Optional.ofNullable(loadPMMLInfo(path)).map(pmml -> convertPMMLInfo(path, pmml)).orElse(emptyPMMLDocumentMetadata(path)); } PMMLIncludedDocumentFactory(); @Inject PMMLIncludedDocumentFactory(final @Named("ioStrategy")... | PMMLIncludedDocumentFactory { public PMMLDocumentMetadata getDocumentByPath(final Path path) { return Optional.ofNullable(loadPMMLInfo(path)).map(pmml -> convertPMMLInfo(path, pmml)).orElse(emptyPMMLDocumentMetadata(path)); } PMMLIncludedDocumentFactory(); @Inject PMMLIncludedDocumentFactory(final @Named("ioStrategy")... |
@Test public void testGetCanvasChildIndex() { final Edge edge = mock(Edge.class); when(edge.getTargetNode()).thenReturn(child); when(parent.getOutEdges()).thenReturn(Collections.singletonList(edge)); assertEquals(0, CaseManagementCommandUtil.getChildCanvasIndex(parent, child)); } | @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicate = (Objects.isNull(parent.g... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... |
@Test public void testGetCanvasChildIndex_withStage() { setupForStage(); assertEquals(1, CaseManagementCommandUtil.getChildCanvasIndex(parent, child)); } | @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicate = (Objects.isNull(parent.g... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... |
@Test public void testGetCanvasChildIndex_withSubStage() { setupForSubStage(); assertEquals(1, CaseManagementCommandUtil.getChildCanvasIndex(parent, child)); } | @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicate = (Objects.isNull(parent.g... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildCanvasIndex(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { Predicate<Node> predicat... |
@Test public void testGetGraphIndex() { final Edge edge = mock(Edge.class); when(edge.getTargetNode()).thenReturn(child); when(parent.getOutEdges()).thenReturn(Collections.singletonList(edge)); assertEquals(0, CaseManagementCommandUtil.getChildGraphIndex(parent, child)); } | @SuppressWarnings("unchecked") public static int getChildGraphIndex(final Node parent, final Node child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { for (int i = 0, n = outEdges.size(); i < n; i++) { if (child.equals(outEdges.get(i)... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildGraphIndex(final Node parent, final Node child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { for (int i = 0, n = outEdges.size(); i < n; i++) { if (... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildGraphIndex(final Node parent, final Node child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { for (int i = 0, n = outEdges.size(); i < n; i++) { if (... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildGraphIndex(final Node parent, final Node child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { for (int i = 0, n = outEdges.size(); i < n; i++) { if (... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getChildGraphIndex(final Node parent, final Node child) { if (parent != null && child != null) { List<Edge> outEdges = parent.getOutEdges(); if (null != outEdges && !outEdges.isEmpty()) { for (int i = 0, n = outEdges.size(); i < n; i++) { if (... |
@Test public void testIsStage_withStage() { setupForStage(); assertTrue(CaseManagementCommandUtil.isStage(parent, child)); } | public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } } | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } } | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } @SuppressWarnings("unchecked") static Node<Definiti... | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } @SuppressWarnings("unchecked") static Node<Definiti... |
@Test public void testIsStage_withSubStage() { setupForSubStage(); assertFalse(CaseManagementCommandUtil.isStage(parent, child)); } | public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } } | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } } | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } @SuppressWarnings("unchecked") static Node<Definiti... | CaseManagementCommandUtil { public static boolean isStage(final Node<View<?>, Edge> parent, final Node<View<?>, Edge> child) { return !Objects.isNull(parent.getContent()) && parent.getContent().getDefinition() instanceof CaseManagementDiagram && isStageNode(child); } @SuppressWarnings("unchecked") static Node<Definiti... |
@Test public void testIsStageNode() { setupForStage(); assertTrue(CaseManagementCommandUtil.isStageNode(child)); } | public static boolean isStageNode(final Node<View<?>, Edge> node) { if (node.getContent().getDefinition() instanceof AdHocSubprocess) { final List<Node> childNodes = node.getOutEdges().stream() .filter(childPredicate()) .map(Edge::getTargetNode).collect(Collectors.toList()); return childNodes.isEmpty() || childNodes.st... | CaseManagementCommandUtil { public static boolean isStageNode(final Node<View<?>, Edge> node) { if (node.getContent().getDefinition() instanceof AdHocSubprocess) { final List<Node> childNodes = node.getOutEdges().stream() .filter(childPredicate()) .map(Edge::getTargetNode).collect(Collectors.toList()); return childNode... | CaseManagementCommandUtil { public static boolean isStageNode(final Node<View<?>, Edge> node) { if (node.getContent().getDefinition() instanceof AdHocSubprocess) { final List<Node> childNodes = node.getOutEdges().stream() .filter(childPredicate()) .map(Edge::getTargetNode).collect(Collectors.toList()); return childNode... | CaseManagementCommandUtil { public static boolean isStageNode(final Node<View<?>, Edge> node) { if (node.getContent().getDefinition() instanceof AdHocSubprocess) { final List<Node> childNodes = node.getOutEdges().stream() .filter(childPredicate()) .map(Edge::getTargetNode).collect(Collectors.toList()); return childNode... | CaseManagementCommandUtil { public static boolean isStageNode(final Node<View<?>, Edge> node) { if (node.getContent().getDefinition() instanceof AdHocSubprocess) { final List<Node> childNodes = node.getOutEdges().stream() .filter(childPredicate()) .map(Edge::getTargetNode).collect(Collectors.toList()); return childNode... |
@Test public void testIsSubStageNode() { setupForSubStage(); assertTrue(CaseManagementCommandUtil.isSubStageNode(child)); } | public static boolean isSubStageNode(final Node<View<?>, Edge> node) { return node.getContent().getDefinition() instanceof UserTask || node.getContent().getDefinition() instanceof ReusableSubprocess; } | CaseManagementCommandUtil { public static boolean isSubStageNode(final Node<View<?>, Edge> node) { return node.getContent().getDefinition() instanceof UserTask || node.getContent().getDefinition() instanceof ReusableSubprocess; } } | CaseManagementCommandUtil { public static boolean isSubStageNode(final Node<View<?>, Edge> node) { return node.getContent().getDefinition() instanceof UserTask || node.getContent().getDefinition() instanceof ReusableSubprocess; } } | CaseManagementCommandUtil { public static boolean isSubStageNode(final Node<View<?>, Edge> node) { return node.getContent().getDefinition() instanceof UserTask || node.getContent().getDefinition() instanceof ReusableSubprocess; } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> getFirst... | CaseManagementCommandUtil { public static boolean isSubStageNode(final Node<View<?>, Edge> node) { return node.getContent().getDefinition() instanceof UserTask || node.getContent().getDefinition() instanceof ReusableSubprocess; } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> getFirst... |
@Test public void testChildPredicate() { final Predicate<Edge> predicate = CaseManagementCommandUtil.childPredicate(); final Edge edge = mock(Edge.class); when(edge.getContent()).thenReturn(mock(Child.class)); assertTrue(predicate.test(edge)); } | public static Predicate<Edge> childPredicate() { return edge -> edge.getContent() instanceof Child; } | CaseManagementCommandUtil { public static Predicate<Edge> childPredicate() { return edge -> edge.getContent() instanceof Child; } } | CaseManagementCommandUtil { public static Predicate<Edge> childPredicate() { return edge -> edge.getContent() instanceof Child; } } | CaseManagementCommandUtil { public static Predicate<Edge> childPredicate() { return edge -> edge.getContent() instanceof Child; } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph); @SuppressWarnings("unchecked") static int getChildGraphInde... | CaseManagementCommandUtil { public static Predicate<Edge> childPredicate() { return edge -> edge.getContent() instanceof Child; } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNode(final Graph<?, Node> graph); @SuppressWarnings("unchecked") static int getChildGraphInde... |
@Test public void testSequencePredicate() { final Predicate<Edge> predicate = CaseManagementCommandUtil.sequencePredicate(); final Edge edge = mock(Edge.class); final ViewConnector viewConnector = mock(ViewConnector.class); when(viewConnector.getDefinition()).thenReturn(mock(SequenceFlow.class)); when(edge.getContent()... | public static Predicate<Edge> sequencePredicate() { return edge -> edge.getContent() instanceof ViewConnector && ((ViewConnector) edge.getContent()).getDefinition() instanceof SequenceFlow; } | CaseManagementCommandUtil { public static Predicate<Edge> sequencePredicate() { return edge -> edge.getContent() instanceof ViewConnector && ((ViewConnector) edge.getContent()).getDefinition() instanceof SequenceFlow; } } | CaseManagementCommandUtil { public static Predicate<Edge> sequencePredicate() { return edge -> edge.getContent() instanceof ViewConnector && ((ViewConnector) edge.getContent()).getDefinition() instanceof SequenceFlow; } } | CaseManagementCommandUtil { public static Predicate<Edge> sequencePredicate() { return edge -> edge.getContent() instanceof ViewConnector && ((ViewConnector) edge.getContent()).getDefinition() instanceof SequenceFlow; } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNod... | CaseManagementCommandUtil { public static Predicate<Edge> sequencePredicate() { return edge -> edge.getContent() instanceof ViewConnector && ((ViewConnector) edge.getContent()).getDefinition() instanceof SequenceFlow; } @SuppressWarnings("unchecked") static Node<Definition<CaseManagementDiagram>, ?> getFirstDiagramNod... |
@Test public void testFocusWhenLazyLoadIsEmpty() { utils.releaseFocus(); verify(canvasFocusUtils, never()).focus(anyString()); } | public void releaseFocus() { getFocusedNodeUUID().ifPresent(canvasFocusUtils::focus); releaseNodeUUID(); } | LazyCanvasFocusUtils { public void releaseFocus() { getFocusedNodeUUID().ifPresent(canvasFocusUtils::focus); releaseNodeUUID(); } } | LazyCanvasFocusUtils { public void releaseFocus() { getFocusedNodeUUID().ifPresent(canvasFocusUtils::focus); releaseNodeUUID(); } LazyCanvasFocusUtils(); @Inject LazyCanvasFocusUtils(final CanvasFocusUtils canvasFocusUtils); } | LazyCanvasFocusUtils { public void releaseFocus() { getFocusedNodeUUID().ifPresent(canvasFocusUtils::focus); releaseNodeUUID(); } LazyCanvasFocusUtils(); @Inject LazyCanvasFocusUtils(final CanvasFocusUtils canvasFocusUtils); void lazyFocus(final String nodeUUID); void releaseFocus(); } | LazyCanvasFocusUtils { public void releaseFocus() { getFocusedNodeUUID().ifPresent(canvasFocusUtils::focus); releaseNodeUUID(); } LazyCanvasFocusUtils(); @Inject LazyCanvasFocusUtils(final CanvasFocusUtils canvasFocusUtils); void lazyFocus(final String nodeUUID); void releaseFocus(); } |
@Test public void testGetCanvasNewChildIndex_withStage() { setupForStage(); assertEquals(2, CaseManagementCommandUtil.getNewChildCanvasIndex(parent)); } | @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode : CaseManagementCommandUtil::... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... |
@Test public void testGetCanvasNewChildIndex_withSubStage() { setupForSubStage(); assertEquals(2, CaseManagementCommandUtil.getNewChildCanvasIndex(parent)); } | @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode : CaseManagementCommandUtil::... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildCanvasIndex(final Node<View<?>, Edge> parent) { Predicate<Node> predicate = Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram) ? CaseManagementCommandUtil::isSubStageNode :... |
@Test public void testGetGraphNewChildIndex_withStage() { setupForStage(); assertEquals(2, CaseManagementCommandUtil.getNewChildGraphIndex(parent)); } | @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> childNodes = parent.getOutEdges... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... |
@Test public void testGetGraphNewChildIndex_withSubStage() { setupForSubStage(); assertEquals(2, CaseManagementCommandUtil.getNewChildGraphIndex(parent)); } | @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> childNodes = parent.getOutEdges... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... | CaseManagementCommandUtil { @SuppressWarnings("unchecked") public static int getNewChildGraphIndex(final Node<View<?>, Edge> parent) { if (Objects.isNull(parent.getContent()) || !(parent.getContent().getDefinition() instanceof CaseManagementDiagram)) { return parent.getOutEdges().size(); } List<Node<View<?>, Edge>> chi... |
@Test public void testExecute() throws Exception { tested.execute(canvasHandler); verify(canvasHandler, times(1)).deregister(eq(rootShape), eq(rootNode), eq(true)); verify(canvasHandler, times(1)).register(eq(SHAPE_SET_ID), eq(rootNode)); } | @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final CommandResult<CanvasViolation> result = super.exec... | CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final ... | CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final ... | CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final ... | CaseManagementClearCommand extends ClearCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(AbstractCanvasHandler context) { final String rootUUID = context.getDiagram().getMetadata().getCanvasRootUUID(); final Shape rootShape = context.getCanvas().getShape(rootUUID); final ... |
@Test public void testNewGraphCommand() { final Command<GraphCommandExecutionContext, RuleViolation> command = tested.newGraphCommand(canvasHandler); assertNotNull(command); assertTrue(command instanceof org.kie.workbench.common.stunner.cm.client.command.graph.CaseManagementAddNodeCommand); assertEquals(candidate, ((or... | @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new org.kie.workbench.common.stunner.cm.client.command.graph.CaseManagementAddNodeCommand(getCandidate()); } | CaseManagementAddNodeCommand extends AddNodeCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new org.kie.workbench.common.stunner.cm.client.command.graph.CaseManagementAddNodeCommand(getCandidate()); } } | CaseManagementAddNodeCommand extends AddNodeCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new org.kie.workbench.common.stunner.cm.client.command.graph.CaseManagementAddNodeCommand(getCandidate()); } CaseManagementAddNodeCommand... | CaseManagementAddNodeCommand extends AddNodeCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new org.kie.workbench.common.stunner.cm.client.command.graph.CaseManagementAddNodeCommand(getCandidate()); } CaseManagementAddNodeCommand... | CaseManagementAddNodeCommand extends AddNodeCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new org.kie.workbench.common.stunner.cm.client.command.graph.CaseManagementAddNodeCommand(getCandidate()); } CaseManagementAddNodeCommand... |
@Test public void checkDrawCommandType() { final CanvasCommand<AbstractCanvasHandler> command = factory.draw(); assertNotNull(command); assertTrue(command instanceof CaseManagementDrawCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> draw() { return new CaseManagementDrawCommand(newChildrenTraverseProcessor()); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> draw() { return new CaseManagementDrawCommand(newChildrenTraverseProcessor()); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> draw() { return new CaseManagementDrawCommand(newChildrenTraverseProcessor()); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProc... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> draw() { return new CaseManagementDrawCommand(newChildrenTraverseProcessor()); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProc... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> draw() { return new CaseManagementDrawCommand(newChildrenTraverseProcessor()); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProc... |
@Test public void checkAddChildNodeCommandType() { final CanvasCommand<AbstractCanvasHandler> command = factory.addChildNode(parent, child, CaseManagementShapeSet.class.getName()); assertNotNull(command); assertTrue(command instanceof CaseManagementAddChildCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> addChildNode(final Node parent, final Node child, final String shapeSetId) { return new CaseManagementAddChildCommand(parent, child, shapeSetId); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addChildNode(final Node parent, final Node child, final String shapeSetId) { return new CaseManagementAddChildCommand(parent, child, shapeSetId); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addChildNode(final Node parent, final Node child, final String shapeSetId) { return new CaseManagementAddChildCommand(parent, child, shapeSetId); } @Inject CaseManagementCanvasCommandFactory(fi... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addChildNode(final Node parent, final Node child, final String shapeSetId) { return new CaseManagementAddChildCommand(parent, child, shapeSetId); } @Inject CaseManagementCanvasCommandFactory(fi... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addChildNode(final Node parent, final Node child, final String shapeSetId) { return new CaseManagementAddChildCommand(parent, child, shapeSetId); } @Inject CaseManagementCanvasCommandFactory(fi... |
@Test public void checkSetChildNodeCommandType() { final CanvasCommand<AbstractCanvasHandler> command = factory.setChildNode(parent, child); assertNotNull(command); assertTrue(command instanceof CaseManagementSetChildCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseP... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseP... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseP... |
@Test public void checkSetChildNodeForCanvasManagementCommandType() { final CanvasCommand<AbstractCanvasHandler> command = factory.setChildNode(parent, child, Optional.empty(), OptionalInt.of(0), Optional.empty(), OptionalInt.empty()); assertNotNull(command); assertTrue(command instanceof CaseManagementSetChildCommand)... | @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseP... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseP... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> setChildNode(final Node parent, final Node child) { return new CaseManagementSetChildCommand(parent, child); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseP... |
@Test public void testFocus() { final CanvasHandler canvasHandler = mock(CanvasHandler.class); final Canvas canvas = mock(Canvas.class); final String uuid = "uuid"; final CanvasSelectionEvent canvasSelection = new CanvasSelectionEvent(canvasHandler, uuid); final CanvasFocusedShapeEvent canvasFocusedShape = new CanvasFo... | public void focus(final String nodeUUID) { final CanvasHandler canvasHandler = dmnGraphUtils.getCanvasHandler(); canvasSelectionEvent.fire(makeCanvasSelectionEvent(canvasHandler, nodeUUID)); canvasFocusedSelectionEvent.fire(makeCanvasFocusedShapeEvent(canvasHandler, nodeUUID)); if (canvasHandler != null && canvasHandle... | CanvasFocusUtils { public void focus(final String nodeUUID) { final CanvasHandler canvasHandler = dmnGraphUtils.getCanvasHandler(); canvasSelectionEvent.fire(makeCanvasSelectionEvent(canvasHandler, nodeUUID)); canvasFocusedSelectionEvent.fire(makeCanvasFocusedShapeEvent(canvasHandler, nodeUUID)); if (canvasHandler != n... | CanvasFocusUtils { public void focus(final String nodeUUID) { final CanvasHandler canvasHandler = dmnGraphUtils.getCanvasHandler(); canvasSelectionEvent.fire(makeCanvasSelectionEvent(canvasHandler, nodeUUID)); canvasFocusedSelectionEvent.fire(makeCanvasFocusedShapeEvent(canvasHandler, nodeUUID)); if (canvasHandler != n... | CanvasFocusUtils { public void focus(final String nodeUUID) { final CanvasHandler canvasHandler = dmnGraphUtils.getCanvasHandler(); canvasSelectionEvent.fire(makeCanvasSelectionEvent(canvasHandler, nodeUUID)); canvasFocusedSelectionEvent.fire(makeCanvasFocusedShapeEvent(canvasHandler, nodeUUID)); if (canvasHandler != n... | CanvasFocusUtils { public void focus(final String nodeUUID) { final CanvasHandler canvasHandler = dmnGraphUtils.getCanvasHandler(); canvasSelectionEvent.fire(makeCanvasSelectionEvent(canvasHandler, nodeUUID)); canvasFocusedSelectionEvent.fire(makeCanvasFocusedShapeEvent(canvasHandler, nodeUUID)); if (canvasHandler != n... |
@Test public void checkRemoveChildCommandType() { final CanvasCommand<AbstractCanvasHandler> command = factory.removeChild(parent, child); assertNotNull(command); assertTrue(command instanceof CaseManagementRemoveChildCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> removeChild(final Node parent, final Node candidate) { return new CaseManagementRemoveChildCommand(parent, candidate); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> removeChild(final Node parent, final Node candidate) { return new CaseManagementRemoveChildCommand(parent, candidate); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> removeChild(final Node parent, final Node candidate) { return new CaseManagementRemoveChildCommand(parent, candidate); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<Childre... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> removeChild(final Node parent, final Node candidate) { return new CaseManagementRemoveChildCommand(parent, candidate); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<Childre... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> removeChild(final Node parent, final Node candidate) { return new CaseManagementRemoveChildCommand(parent, candidate); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<Childre... |
@Test @SuppressWarnings("unchecked") public void checkUpdatePositionCommandType() { final CanvasCommand<AbstractCanvasHandler> command = factory.updatePosition(child, new Point2D(0.0, 0.0)); assertNotNull(command); assertTrue(command instanceof CaseManagementUpdatePositionCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> updatePosition(final Node<View<?>, Edge> element, final Point2D location) { return new CaseManagementUpdatePositionCommand(element, location); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> updatePosition(final Node<View<?>, Edge> element, final Point2D location) { return new CaseManagementUpdatePositionCommand(element, location); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> updatePosition(final Node<View<?>, Edge> element, final Point2D location) { return new CaseManagementUpdatePositionCommand(element, location); } @Inject CaseManagementCanvasCommandFactory(final... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> updatePosition(final Node<View<?>, Edge> element, final Point2D location) { return new CaseManagementUpdatePositionCommand(element, location); } @Inject CaseManagementCanvasCommandFactory(final... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> updatePosition(final Node<View<?>, Edge> element, final Point2D location) { return new CaseManagementUpdatePositionCommand(element, location); } @Inject CaseManagementCanvasCommandFactory(final... |
@Test public void checkDelete() { final CanvasCommand<AbstractCanvasHandler> command = factory.delete(Collections.singletonList(child)); assertNotNull(command); assertTrue(command instanceof CaseManagementDeleteElementsCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> delete(Collection<Element> candidates) { return new CaseManagementDeleteElementsCommand(candidates); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> delete(Collection<Element> candidates) { return new CaseManagementDeleteElementsCommand(candidates); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> delete(Collection<Element> candidates) { return new CaseManagementDeleteElementsCommand(candidates); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> delete(Collection<Element> candidates) { return new CaseManagementDeleteElementsCommand(candidates); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> delete(Collection<Element> candidates) { return new CaseManagementDeleteElementsCommand(candidates); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor... |
@Test public void checkDeleteNode() { final CanvasCommand<AbstractCanvasHandler> command = factory.deleteNode(child); assertNotNull(command); assertTrue(command instanceof CaseManagementDeleteNodeCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> deleteNode(Node candidate) { return new CaseManagementDeleteNodeCommand(candidate); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> deleteNode(Node candidate) { return new CaseManagementDeleteNodeCommand(candidate); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> deleteNode(Node candidate) { return new CaseManagementDeleteNodeCommand(candidate); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTravers... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> deleteNode(Node candidate) { return new CaseManagementDeleteNodeCommand(candidate); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTravers... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> deleteNode(Node candidate) { return new CaseManagementDeleteNodeCommand(candidate); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTravers... |
@Test public void checkAddNode() { final CanvasCommand<AbstractCanvasHandler> command = factory.addNode(child, CaseManagementShapeSet.class.getName()); assertNotNull(command); assertTrue(command instanceof CaseManagementAddNodeCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> addNode(final Node candidate, final String shapeSetId) { return new CaseManagementAddNodeCommand(candidate, shapeSetId); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addNode(final Node candidate, final String shapeSetId) { return new CaseManagementAddNodeCommand(candidate, shapeSetId); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addNode(final Node candidate, final String shapeSetId) { return new CaseManagementAddNodeCommand(candidate, shapeSetId); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<Child... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addNode(final Node candidate, final String shapeSetId) { return new CaseManagementAddNodeCommand(candidate, shapeSetId); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<Child... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> addNode(final Node candidate, final String shapeSetId) { return new CaseManagementAddNodeCommand(candidate, shapeSetId); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<Child... |
@Test public void checkClearCanvas() { final CanvasCommand<AbstractCanvasHandler> command = factory.clearCanvas(); assertNotNull(command); assertTrue(command instanceof CaseManagementClearCommand); } | @Override public CanvasCommand<AbstractCanvasHandler> clearCanvas() { return new CaseManagementClearCommand(); } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> clearCanvas() { return new CaseManagementClearCommand(); } } | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> clearCanvas() { return new CaseManagementClearCommand(); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessors,
... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> clearCanvas() { return new CaseManagementClearCommand(); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessors,
... | CaseManagementCanvasCommandFactory extends LienzoCanvasCommandFactory { @Override public CanvasCommand<AbstractCanvasHandler> clearCanvas() { return new CaseManagementClearCommand(); } @Inject CaseManagementCanvasCommandFactory(final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessors,
... |
@Test public void checkUndo() { final CaseManagementSetChildNodeGraphCommand command = setChildNode(parent, candidate, index, originalParent, originalIndex); command.undo(context); assertEquals(0, parent.getOutEdges().size()); assertEquals(0, candidate.getInEdges().size()); } | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEdgeForSource(out, child, sequencePredicate()) .ifPresent((e) -> removeR... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... |
@Test public void checkUndoWhenChildHasExistingParent() { setChildNode(parent, candidate, index, originalParent, originalIndex); final Node<View<?>, Edge> newParent = CommandTestUtils.makeNode("uuid3", "existingParent", 10.0, 20.0, 50.0, 50.0); final CaseManagementSetChildNodeGraphCommand addToNewParentCommand = setChi... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEdgeForSource(out, child, sequencePredicate()) .ifPresent((e) -> removeR... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { getEdgeForTarget(in, child, sequencePredicate()) .ifPresent((e) -> removeRelationship(e, in.get(), child, context)); getEd... |
@Test public void testRemoveExistingRelationship() { final Node diagram = createNode(CaseManagementDiagram.class); final Node stage = createNode(AdHocSubprocess.class); final Node start = createNode(StartNoneEvent.class); final Node end = createNode(EndNoneEvent.class); createChildEdge(diagram, start); createChildEdge(... | @SuppressWarnings("unchecked") void removeExistingRelationship(final GraphCommandExecutionContext context) { originalParent.ifPresent(p -> { if (isStage(p, child)) { originalIn = child.getInEdges().stream() .filter(sequencePredicate()).map(e -> (Node<View<?>, Edge>) e.getSourceNode()).findAny(); originalOut = child.get... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void removeExistingRelationship(final GraphCommandExecutionContext context) { originalParent.ifPresent(p -> { if (isStage(p, child)) { originalIn = child.getInEdges().stream() .filter(sequencePredicate()).map(e -> (Node... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void removeExistingRelationship(final GraphCommandExecutionContext context) { originalParent.ifPresent(p -> { if (isStage(p, child)) { originalIn = child.getInEdges().stream() .filter(sequencePredicate()).map(e -> (Node... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void removeExistingRelationship(final GraphCommandExecutionContext context) { originalParent.ifPresent(p -> { if (isStage(p, child)) { originalIn = child.getInEdges().stream() .filter(sequencePredicate()).map(e -> (Node... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void removeExistingRelationship(final GraphCommandExecutionContext context) { originalParent.ifPresent(p -> { if (isStage(p, child)) { originalIn = child.getInEdges().stream() .filter(sequencePredicate()).map(e -> (Node... |
@Test public void testAddNewRelationship_withIndex() { final Node diagram = createNode(CaseManagementDiagram.class); final Node start = createNode(StartNoneEvent.class); final Node end = createNode(EndNoneEvent.class); final Node stage = createNode(AdHocSubprocess.class); final Node candidate = createNode(AdHocSubproce... | @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collect(Collectors.toList()); if (index.isPresent()) { for (int i = index.ge... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... |
@Test public void testSetup() { presenter.setup(); verify(view).init(presenter); } | @PostConstruct void setup() { view.init(this); } | DecisionNavigatorTreePresenter { @PostConstruct void setup() { view.init(this); } } | DecisionNavigatorTreePresenter { @PostConstruct void setup() { view.init(this); } @Inject DecisionNavigatorTreePresenter(final View view); } | DecisionNavigatorTreePresenter { @PostConstruct void setup() { view.init(this); } @Inject DecisionNavigatorTreePresenter(final View view); View getView(); void setupItems(final List<DecisionNavigatorItem> items); void removeAllItems(); DecisionNavigatorItem getActiveParent(); void setActiveParentUUID(final String acti... | DecisionNavigatorTreePresenter { @PostConstruct void setup() { view.init(this); } @Inject DecisionNavigatorTreePresenter(final View view); View getView(); void setupItems(final List<DecisionNavigatorItem> items); void removeAllItems(); DecisionNavigatorItem getActiveParent(); void setActiveParentUUID(final String acti... |
@Test public void testAddNewRelationship_noIndex() { final Node diagram = createNode(CaseManagementDiagram.class); final Node start = createNode(StartNoneEvent.class); final Node end = createNode(EndNoneEvent.class); final Node stage = createNode(AdHocSubprocess.class); final Node candidate = createNode(AdHocSubprocess... | @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collect(Collectors.toList()); if (index.isPresent()) { for (int i = index.ge... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void addNewRelationship(final GraphCommandExecutionContext context) { OptionalInt insertIndex = index; if (isStage(parent, child)) { List<Node> childNodes = parent.getOutEdges().stream() .map(Edge::getTargetNode).collec... |
@Test public void testSequenceFlowSupplier() { final CaseManagementSetChildNodeGraphCommand command = new CaseManagementSetChildNodeGraphCommand(parent, candidate, index, originalParent, originalIndex); final Supplier<ViewConnector<SequenceFlow>> supplier = command.sequenceFlowSupplier(); final ViewConnector<SequenceFl... | Supplier<ViewConnector<SequenceFlow>> sequenceFlowSupplier() { ViewConnector<SequenceFlow> viewConnector = new ViewConnectorImpl<>(new SequenceFlow(), Bounds.create(0d, 0d, 30d, 30d)); viewConnector.setSourceConnection(new MagnetConnection.Builder().atX(475d).atY(475d).auto(true).build()); viewConnector.setTargetConnec... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { Supplier<ViewConnector<SequenceFlow>> sequenceFlowSupplier() { ViewConnector<SequenceFlow> viewConnector = new ViewConnectorImpl<>(new SequenceFlow(), Bounds.create(0d, 0d, 30d, 30d)); viewConnector.setSourceConnection(new MagnetConnection.Builder().... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { Supplier<ViewConnector<SequenceFlow>> sequenceFlowSupplier() { ViewConnector<SequenceFlow> viewConnector = new ViewConnectorImpl<>(new SequenceFlow(), Bounds.create(0d, 0d, 30d, 30d)); viewConnector.setSourceConnection(new MagnetConnection.Builder().... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { Supplier<ViewConnector<SequenceFlow>> sequenceFlowSupplier() { ViewConnector<SequenceFlow> viewConnector = new ViewConnectorImpl<>(new SequenceFlow(), Bounds.create(0d, 0d, 30d, 30d)); viewConnector.setSourceConnection(new MagnetConnection.Builder().... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { Supplier<ViewConnector<SequenceFlow>> sequenceFlowSupplier() { ViewConnector<SequenceFlow> viewConnector = new ViewConnectorImpl<>(new SequenceFlow(), Bounds.create(0d, 0d, 30d, 30d)); viewConnector.setSourceConnection(new MagnetConnection.Builder().... |
@Test public void testResizeNodes() { final Node stage = createNode(AdHocSubprocess.class, 1.0, 1.0, 25.0, 25.0); final Node task = createNode(UserTask.class, 1.0, 1.0, 5.0, 5.0); final CaseManagementSetChildNodeGraphCommand command = new CaseManagementSetChildNodeGraphCommand(stage, task, index, originalParent, origin... | @SuppressWarnings("unchecked") void resizeNodes() { if (isStageNode(parent) && isSubStageNode(child)) { final List<Node> childNodes = parent.getOutEdges().stream() .filter(childPredicate()).map(Edge::getTargetNode).collect(Collectors.toList()); childNodes.stream().forEach(cNode -> { final Bounds cBounds = ((Node<View, ... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void resizeNodes() { if (isStageNode(parent) && isSubStageNode(child)) { final List<Node> childNodes = parent.getOutEdges().stream() .filter(childPredicate()).map(Edge::getTargetNode).collect(Collectors.toList()); child... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void resizeNodes() { if (isStageNode(parent) && isSubStageNode(child)) { final List<Node> childNodes = parent.getOutEdges().stream() .filter(childPredicate()).map(Edge::getTargetNode).collect(Collectors.toList()); child... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void resizeNodes() { if (isStageNode(parent) && isSubStageNode(child)) { final List<Node> childNodes = parent.getOutEdges().stream() .filter(childPredicate()).map(Edge::getTargetNode).collect(Collectors.toList()); child... | CaseManagementSetChildNodeGraphCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") void resizeNodes() { if (isStageNode(parent) && isSubStageNode(child)) { final List<Node> childNodes = parent.getOutEdges().stream() .filter(childPredicate()).map(Edge::getTargetNode).collect(Collectors.toList()); child... |
@Test @SuppressWarnings("unchecked") public void testCreateRemoveChildCommand() { final CaseManagementRemoveChildCommand command = tested.createRemoveChildCommand(parent, candidate); assertEquals(parent, command.getParent()); assertEquals(candidate, command.getCandidate()); } | @Override @SuppressWarnings("unchecked") protected CaseManagementRemoveChildCommand createRemoveChildCommand(final Element<?> parent, final Node<?, Edge> candidate) { return new CaseManagementRemoveChildCommand((Node<View<?>, Edge>) parent, (Node<View<?>, Edge>) candidate); } | CaseManagementSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected CaseManagementRemoveChildCommand createRemoveChildCommand(final Element<?> parent, final Node<?, Edge> candidate) { return new CaseManagementRemoveChildCommand((Node<View<?>, Edge>) parent, (Node<View<... | CaseManagementSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected CaseManagementRemoveChildCommand createRemoveChildCommand(final Element<?> parent, final Node<?, Edge> candidate) { return new CaseManagementRemoveChildCommand((Node<View<?>, Edge>) parent, (Node<View<... | CaseManagementSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected CaseManagementRemoveChildCommand createRemoveChildCommand(final Element<?> parent, final Node<?, Edge> candidate) { return new CaseManagementRemoveChildCommand((Node<View<?>, Edge>) parent, (Node<View<... | CaseManagementSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected CaseManagementRemoveChildCommand createRemoveChildCommand(final Element<?> parent, final Node<?, Edge> candidate) { return new CaseManagementRemoveChildCommand((Node<View<?>, Edge>) parent, (Node<View<... |
@Test public void testUndo() { parent.getOutEdges().clear(); tested.undo(context); assertEquals(1, parent.getOutEdges().size()); assertEquals(1, candidate.getInEdges().size()); assertEquals(parent.getOutEdges().get(0), candidate.getInEdges().get(0)); final Edge edge = parent.getOutEdges().get(0); assertEquals(parent, e... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(GraphCommandExecutionContext context) { final Node<View<?>, Edge> parent = (Node<View<?>, Edge>) getParent(context); final Node<View<?>, Edge> candidate = (Node<View<?>, Edge>) getCandidate(context); final CaseManagementSetChildNodeGraphC... | CaseManagementRemoveChildCommand extends RemoveChildrenCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(GraphCommandExecutionContext context) { final Node<View<?>, Edge> parent = (Node<View<?>, Edge>) getParent(context); final Node<View<?>, Edge> candidate = (Node<View<?>, Edg... | CaseManagementRemoveChildCommand extends RemoveChildrenCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(GraphCommandExecutionContext context) { final Node<View<?>, Edge> parent = (Node<View<?>, Edge>) getParent(context); final Node<View<?>, Edge> candidate = (Node<View<?>, Edg... | CaseManagementRemoveChildCommand extends RemoveChildrenCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(GraphCommandExecutionContext context) { final Node<View<?>, Edge> parent = (Node<View<?>, Edge>) getParent(context); final Node<View<?>, Edge> candidate = (Node<View<?>, Edg... | CaseManagementRemoveChildCommand extends RemoveChildrenCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(GraphCommandExecutionContext context) { final Node<View<?>, Edge> parent = (Node<View<?>, Edge>) getParent(context); final Node<View<?>, Edge> candidate = (Node<View<?>, Edg... |
@Test @SuppressWarnings("unchecked") public void testCreateSafeDeleteNodeCommand() { final CaseManagementSafeDeleteNodeCommand command = tested.createSafeDeleteNodeCommand(node, SafeDeleteNodeCommand.Options.defaults(), new DeleteElementsCommand.DeleteCallback() { }); assertEquals(node, command.getNode()); } | @Override protected CaseManagementSafeDeleteNodeCommand createSafeDeleteNodeCommand(final Node<?, Edge> node, final SafeDeleteNodeCommand.Options options, final DeleteCallback callback) { return new CaseManagementSafeDeleteNodeCommand(node, callback.onDeleteNode(node, options), options); } | CaseManagementDeleteElementsCommand extends DeleteElementsCommand { @Override protected CaseManagementSafeDeleteNodeCommand createSafeDeleteNodeCommand(final Node<?, Edge> node, final SafeDeleteNodeCommand.Options options, final DeleteCallback callback) { return new CaseManagementSafeDeleteNodeCommand(node, callback.on... | CaseManagementDeleteElementsCommand extends DeleteElementsCommand { @Override protected CaseManagementSafeDeleteNodeCommand createSafeDeleteNodeCommand(final Node<?, Edge> node, final SafeDeleteNodeCommand.Options options, final DeleteCallback callback) { return new CaseManagementSafeDeleteNodeCommand(node, callback.on... | CaseManagementDeleteElementsCommand extends DeleteElementsCommand { @Override protected CaseManagementSafeDeleteNodeCommand createSafeDeleteNodeCommand(final Node<?, Edge> node, final SafeDeleteNodeCommand.Options options, final DeleteCallback callback) { return new CaseManagementSafeDeleteNodeCommand(node, callback.on... | CaseManagementDeleteElementsCommand extends DeleteElementsCommand { @Override protected CaseManagementSafeDeleteNodeCommand createSafeDeleteNodeCommand(final Node<?, Edge> node, final SafeDeleteNodeCommand.Options options, final DeleteCallback callback) { return new CaseManagementSafeDeleteNodeCommand(node, callback.on... |
@Test public void testCreateNodeCommands() throws Exception { tested.createNodeCommands(graphInstance.containerNode, graphInstance.parentNode.getUUID(), position); assertEquals(2, tested.getCommands().size()); assertTrue(RegisterNodeCommand.class.isInstance(tested.getCommands().get(0))); assertTrue(CaseManagementAddChi... | @Override protected void createNodeCommands(final Node<View, Edge> clone, final String parentUUID, final Point2D position) { addCommand(new RegisterNodeCommand(clone)); addCommand(new CaseManagementAddChildNodeGraphCommand(parentUUID, clone, OptionalInt.empty())); } | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected void createNodeCommands(final Node<View, Edge> clone, final String parentUUID, final Point2D position) { addCommand(new RegisterNodeCommand(clone)); addCommand(new CaseManagementAddChildNodeGraphCommand(parentUUID, clone, OptionalInt.empty())... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected void createNodeCommands(final Node<View, Edge> clone, final String parentUUID, final Point2D position) { addCommand(new RegisterNodeCommand(clone)); addCommand(new CaseManagementAddChildNodeGraphCommand(parentUUID, clone, OptionalInt.empty())... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected void createNodeCommands(final Node<View, Edge> clone, final String parentUUID, final Point2D position) { addCommand(new RegisterNodeCommand(clone)); addCommand(new CaseManagementAddChildNodeGraphCommand(parentUUID, clone, OptionalInt.empty())... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected void createNodeCommands(final Node<View, Edge> clone, final String parentUUID, final Point2D position) { addCommand(new RegisterNodeCommand(clone)); addCommand(new CaseManagementAddChildNodeGraphCommand(parentUUID, clone, OptionalInt.empty())... |
@Test public void testCreateCloneChildCommand() throws Exception { final CloneNodeCommand command = tested.createCloneChildCommand(graphInstance.containerNode, graphInstance.parentNode.getUUID(), position, null, childrenTraverseProcessorManagedInstance); assertTrue(CaseManagementCloneNodeCommand.class.isInstance(comman... | @Override protected CloneNodeCommand createCloneChildCommand(final Node candidate, final String parentUuid, final Point2D position, final Consumer<Node> callback, final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessor) { return new CaseManagementCloneNodeCommand(candidate, parentUuid, position, call... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected CloneNodeCommand createCloneChildCommand(final Node candidate, final String parentUuid, final Point2D position, final Consumer<Node> callback, final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessor) { return new CaseManage... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected CloneNodeCommand createCloneChildCommand(final Node candidate, final String parentUuid, final Point2D position, final Consumer<Node> callback, final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessor) { return new CaseManage... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected CloneNodeCommand createCloneChildCommand(final Node candidate, final String parentUuid, final Point2D position, final Consumer<Node> callback, final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessor) { return new CaseManage... | CaseManagementCloneNodeCommand extends CloneNodeCommand { @Override protected CloneNodeCommand createCloneChildCommand(final Node candidate, final String parentUuid, final Point2D position, final Consumer<Node> callback, final ManagedInstance<ChildrenTraverseProcessor> childrenTraverseProcessor) { return new CaseManage... |
@Test public void testExecute() { tested.execute(context); verify(tested).executeCommands(eq(context), commandsCapture.capture()); final CompositeCommand.Builder<AbstractCanvasHandler, CanvasViolation> commands = commandsCapture.getValue(); assertEquals(5, commands.size()); Map<Class<?>, Long> commandsMap = IntStream.r... | @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { final Diagram diagram = context.getDiagram(); final String shapeSetId = context.getDiagram().getMetadata().getShapeSetId(); this.sortNodes(diagram); final CompositeCommand.Builder<AbstractCanvas... | CaseManagementDrawCommand extends AbstractCanvasCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { final Diagram diagram = context.getDiagram(); final String shapeSetId = context.getDiagram().getMetadata().getShapeSetId(); this.sortNod... | CaseManagementDrawCommand extends AbstractCanvasCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { final Diagram diagram = context.getDiagram(); final String shapeSetId = context.getDiagram().getMetadata().getShapeSetId(); this.sortNod... | CaseManagementDrawCommand extends AbstractCanvasCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { final Diagram diagram = context.getDiagram(); final String shapeSetId = context.getDiagram().getMetadata().getShapeSetId(); this.sortNod... | CaseManagementDrawCommand extends AbstractCanvasCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { final Diagram diagram = context.getDiagram(); final String shapeSetId = context.getDiagram().getMetadata().getShapeSetId(); this.sortNod... |
@Test public void testSortNodes_Stage() { final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram = mock(Diagram.class); final Graph<DefinitionSet, Node> graph = mock(Graph.class); when(diagram.getGraph()).thenReturn(graph); final List<Node> nodes = new LinkedList<>(); when(graph.nodes()).thenReturn(nodes); final N... | @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collectors.toList()); nodes.stream() .filter(node -> node.getCon... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... |
@Test public void testSetupItems() { final ArrayList<DecisionNavigatorItem> items = new ArrayList<>(); doNothing().when(presenter).index(items); presenter.setupItems(items); verify(presenter).index(items); verify(view).clean(); verify(view).setup(items); } | public void setupItems(final List<DecisionNavigatorItem> items) { getIndexedItems().clear(); index(items); view.clean(); view.setup(items); } | DecisionNavigatorTreePresenter { public void setupItems(final List<DecisionNavigatorItem> items) { getIndexedItems().clear(); index(items); view.clean(); view.setup(items); } } | DecisionNavigatorTreePresenter { public void setupItems(final List<DecisionNavigatorItem> items) { getIndexedItems().clear(); index(items); view.clean(); view.setup(items); } @Inject DecisionNavigatorTreePresenter(final View view); } | DecisionNavigatorTreePresenter { public void setupItems(final List<DecisionNavigatorItem> items) { getIndexedItems().clear(); index(items); view.clean(); view.setup(items); } @Inject DecisionNavigatorTreePresenter(final View view); View getView(); void setupItems(final List<DecisionNavigatorItem> items); void removeAl... | DecisionNavigatorTreePresenter { public void setupItems(final List<DecisionNavigatorItem> items) { getIndexedItems().clear(); index(items); view.clean(); view.setup(items); } @Inject DecisionNavigatorTreePresenter(final View view); View getView(); void setupItems(final List<DecisionNavigatorItem> items); void removeAl... |
@Test public void testSortNodes_SubStage() { final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram = mock(Diagram.class); final Graph<DefinitionSet, Node> graph = mock(Graph.class); when(diagram.getGraph()).thenReturn(graph); final List<Node> nodes = new LinkedList<>(); when(graph.nodes()).thenReturn(nodes); fina... | @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collectors.toList()); nodes.stream() .filter(node -> node.getCon... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... | CaseManagementDrawCommand extends AbstractCanvasCommand { @SuppressWarnings("unchecked") void sortNodes(final Diagram<Graph<DefinitionSet, Node>, Metadata> diagram) { List<Node<View<?>, Edge>> nodes = StreamSupport.stream(diagram.getGraph().nodes().spliterator(), false) .map(n -> (Node<View<?>, Edge>) n).collect(Collec... |
@Test public void testNewGraphCommand() { final Command<GraphCommandExecutionContext, RuleViolation> graphCommand = tested.newGraphCommand(canvasHandler); assertNotNull(graphCommand); assertTrue(graphCommand instanceof CaseManagementSafeDeleteNodeCommand); assertEquals(candidate, ((CaseManagementSafeDeleteNodeCommand) ... | @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new CaseManagementSafeDeleteNodeCommand(candidate, deleteProcessor, options); } | CaseManagementDeleteNodeCommand extends DeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new CaseManagementSafeDeleteNodeCommand(candidate, deleteProcessor, options); } } | CaseManagementDeleteNodeCommand extends DeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new CaseManagementSafeDeleteNodeCommand(candidate, deleteProcessor, options); } CaseManagementDelete... | CaseManagementDeleteNodeCommand extends DeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new CaseManagementSafeDeleteNodeCommand(candidate, deleteProcessor, options); } CaseManagementDelete... | CaseManagementDeleteNodeCommand extends DeleteNodeCommand { @Override @SuppressWarnings("unchecked") protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(AbstractCanvasHandler context) { return new CaseManagementSafeDeleteNodeCommand(candidate, deleteProcessor, options); } CaseManagementDelete... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.