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 testCalculateVerticesPositions() { final DefaultVertexPositioning tested = mock(DefaultVertexPositioning.class); final LayeredGraph graph = mock(LayeredGraph.class); final List<OrientedEdge> edges = mock(List.class); final LayerArrangement arrangement = LayerArrangement.BottomUp; final Set<Vertex> ver... | @Override public void calculateVerticesPositions(final ReorderedGraph graph, final LayerArrangement arrangement) { final LayeredGraph layered = (LayeredGraph) graph; deReverseEdges(graph); final Set<Vertex> vertices = getVertices(layered); removeVirtualVertices(graph.getEdges(), vertices); removeVirtualVerticesFromLaye... | DefaultVertexPositioning implements VertexPositioning { @Override public void calculateVerticesPositions(final ReorderedGraph graph, final LayerArrangement arrangement) { final LayeredGraph layered = (LayeredGraph) graph; deReverseEdges(graph); final Set<Vertex> vertices = getVertices(layered); removeVirtualVertices(gr... | DefaultVertexPositioning implements VertexPositioning { @Override public void calculateVerticesPositions(final ReorderedGraph graph, final LayerArrangement arrangement) { final LayeredGraph layered = (LayeredGraph) graph; deReverseEdges(graph); final Set<Vertex> vertices = getVertices(layered); removeVirtualVertices(gr... | DefaultVertexPositioning implements VertexPositioning { @Override public void calculateVerticesPositions(final ReorderedGraph graph, final LayerArrangement arrangement) { final LayeredGraph layered = (LayeredGraph) graph; deReverseEdges(graph); final Set<Vertex> vertices = getVertices(layered); removeVirtualVertices(gr... | DefaultVertexPositioning implements VertexPositioning { @Override public void calculateVerticesPositions(final ReorderedGraph graph, final LayerArrangement arrangement) { final LayeredGraph layered = (LayeredGraph) graph; deReverseEdges(graph); final Set<Vertex> vertices = getVertices(layered); removeVirtualVertices(gr... |
@Test public void testGetVertices() { final LayeredGraph graph = new LayeredGraph(); final GraphLayer layer1 = mock(GraphLayer.class); final GraphLayer layer2 = mock(GraphLayer.class); final List<Vertex> vertices1 = new ArrayList<>(); final List<Vertex> vertices2 = new ArrayList<>(); final Vertex v1 = mock(Vertex.class... | Set<Vertex> getVertices(final LayeredGraph layered) { return layered.getLayers().stream() .flatMap(l -> l.getVertices().stream()).collect(Collectors.toSet()); } | DefaultVertexPositioning implements VertexPositioning { Set<Vertex> getVertices(final LayeredGraph layered) { return layered.getLayers().stream() .flatMap(l -> l.getVertices().stream()).collect(Collectors.toSet()); } } | DefaultVertexPositioning implements VertexPositioning { Set<Vertex> getVertices(final LayeredGraph layered) { return layered.getLayers().stream() .flatMap(l -> l.getVertices().stream()).collect(Collectors.toSet()); } } | DefaultVertexPositioning implements VertexPositioning { Set<Vertex> getVertices(final LayeredGraph layered) { return layered.getLayers().stream() .flatMap(l -> l.getVertices().stream()).collect(Collectors.toSet()); } @Override void calculateVerticesPositions(final ReorderedGraph graph,
... | DefaultVertexPositioning implements VertexPositioning { Set<Vertex> getVertices(final LayeredGraph layered) { return layered.getLayers().stream() .flatMap(l -> l.getVertices().stream()).collect(Collectors.toSet()); } @Override void calculateVerticesPositions(final ReorderedGraph graph,
... |
@Test public void testDeReverseEdges() { final LayeredGraph graph = new LayeredGraph(); final OrientedEdgeImpl e1 = new OrientedEdgeImpl("1", "2", true); final OrientedEdgeImpl e2 = new OrientedEdgeImpl("2", "3", false); final OrientedEdgeImpl e3 = new OrientedEdgeImpl("2", "4", true); graph.addEdge(e1); graph.addEdge(... | void deReverseEdges(final ReorderedGraph graph) { for (final OrientedEdge edge : graph.getEdges()) { if (edge.isReversed()) { edge.reverse(); } } } | DefaultVertexPositioning implements VertexPositioning { void deReverseEdges(final ReorderedGraph graph) { for (final OrientedEdge edge : graph.getEdges()) { if (edge.isReversed()) { edge.reverse(); } } } } | DefaultVertexPositioning implements VertexPositioning { void deReverseEdges(final ReorderedGraph graph) { for (final OrientedEdge edge : graph.getEdges()) { if (edge.isReversed()) { edge.reverse(); } } } } | DefaultVertexPositioning implements VertexPositioning { void deReverseEdges(final ReorderedGraph graph) { for (final OrientedEdge edge : graph.getEdges()) { if (edge.isReversed()) { edge.reverse(); } } } @Override void calculateVerticesPositions(final ReorderedGraph graph,
fi... | DefaultVertexPositioning implements VertexPositioning { void deReverseEdges(final ReorderedGraph graph) { for (final OrientedEdge edge : graph.getEdges()) { if (edge.isReversed()) { edge.reverse(); } } } @Override void calculateVerticesPositions(final ReorderedGraph graph,
fi... |
@Test public void testGetLayersStartX() { final int largestWidth = 600; final int layersCount = 3; final HashMap<Integer, Integer> layersWidth = new HashMap<>(); layersWidth.put(0, 200); layersWidth.put(1, 600); layersWidth.put(2, 300); final HashMap<Integer, Integer> startX = tested.getLayersStartX(layersCount, layers... | HashMap<Integer, Integer> getLayersStartX(final int layersCount, final HashMap<Integer, Integer> layersWidth, final int largestWidth) { final HashMap<Integer, Integer> layersStartX = new HashMap<>(); for (int i = 0; i < layersCount; i++) { final int middle = largestWidth / 2; final int layerWidth = layersWidth.get(i); ... | DefaultVertexPositioning implements VertexPositioning { HashMap<Integer, Integer> getLayersStartX(final int layersCount, final HashMap<Integer, Integer> layersWidth, final int largestWidth) { final HashMap<Integer, Integer> layersStartX = new HashMap<>(); for (int i = 0; i < layersCount; i++) { final int middle = large... | DefaultVertexPositioning implements VertexPositioning { HashMap<Integer, Integer> getLayersStartX(final int layersCount, final HashMap<Integer, Integer> layersWidth, final int largestWidth) { final HashMap<Integer, Integer> layersStartX = new HashMap<>(); for (int i = 0; i < layersCount; i++) { final int middle = large... | DefaultVertexPositioning implements VertexPositioning { HashMap<Integer, Integer> getLayersStartX(final int layersCount, final HashMap<Integer, Integer> layersWidth, final int largestWidth) { final HashMap<Integer, Integer> layersStartX = new HashMap<>(); for (int i = 0; i < layersCount; i++) { final int middle = large... | DefaultVertexPositioning implements VertexPositioning { HashMap<Integer, Integer> getLayersStartX(final int layersCount, final HashMap<Integer, Integer> layersWidth, final int largestWidth) { final HashMap<Integer, Integer> layersStartX = new HashMap<>(); for (int i = 0; i < layersCount; i++) { final int middle = large... |
@Test public void testGetLargestWidth() { final GraphLayer layer1 = createGraphLayer(2); final int expectedSize1 = getExpectSize(2); final GraphLayer layer2 = createGraphLayer(4); final int expectedSize2 = getExpectSize(4); final GraphLayer layer3 = createGraphLayer(1); final int expectedSize3 = getExpectSize(1); final... | int calculateLayersWidth(final List<GraphLayer> layers, final HashMap<Integer, Integer> layersWidth) { int largestWidth = 0; for (int i = 0; i < layers.size(); i++) { final GraphLayer layer = layers.get(i); int currentWidth = layer.getVertices().size() * DEFAULT_VERTEX_WIDTH; currentWidth += (layer.getVertices().size()... | DefaultVertexPositioning implements VertexPositioning { int calculateLayersWidth(final List<GraphLayer> layers, final HashMap<Integer, Integer> layersWidth) { int largestWidth = 0; for (int i = 0; i < layers.size(); i++) { final GraphLayer layer = layers.get(i); int currentWidth = layer.getVertices().size() * DEFAULT_V... | DefaultVertexPositioning implements VertexPositioning { int calculateLayersWidth(final List<GraphLayer> layers, final HashMap<Integer, Integer> layersWidth) { int largestWidth = 0; for (int i = 0; i < layers.size(); i++) { final GraphLayer layer = layers.get(i); int currentWidth = layer.getVertices().size() * DEFAULT_V... | DefaultVertexPositioning implements VertexPositioning { int calculateLayersWidth(final List<GraphLayer> layers, final HashMap<Integer, Integer> layersWidth) { int largestWidth = 0; for (int i = 0; i < layers.size(); i++) { final GraphLayer layer = layers.get(i); int currentWidth = layer.getVertices().size() * DEFAULT_V... | DefaultVertexPositioning implements VertexPositioning { int calculateLayersWidth(final List<GraphLayer> layers, final HashMap<Integer, Integer> layersWidth) { int largestWidth = 0; for (int i = 0; i < layers.size(); i++) { final GraphLayer layer = layers.get(i); int currentWidth = layer.getVertices().size() * DEFAULT_V... |
@Test public void testGetVertexHeight() { final int width = 10; final int height = 20; final String id = "1"; int actual = tested.getVertexHeight(id); assertEquals(DEFAULT_VERTEX_HEIGHT, actual); tested.setVertexSize(id, width, height); actual = tested.getVertexHeight(id); assertEquals(height, actual); } | @Override public int getVertexHeight(final String vertexId) { final int height = verticesHeight.getOrDefault(vertexId, DEFAULT_VERTEX_HEIGHT); return height; } | LayeredGraph implements ReorderedGraph { @Override public int getVertexHeight(final String vertexId) { final int height = verticesHeight.getOrDefault(vertexId, DEFAULT_VERTEX_HEIGHT); return height; } } | LayeredGraph implements ReorderedGraph { @Override public int getVertexHeight(final String vertexId) { final int height = verticesHeight.getOrDefault(vertexId, DEFAULT_VERTEX_HEIGHT); return height; } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); } | LayeredGraph implements ReorderedGraph { @Override public int getVertexHeight(final String vertexId) { final int height = verticesHeight.getOrDefault(vertexId, DEFAULT_VERTEX_HEIGHT); return height; } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); void addEdge(final String from,
fi... | LayeredGraph implements ReorderedGraph { @Override public int getVertexHeight(final String vertexId) { final int height = verticesHeight.getOrDefault(vertexId, DEFAULT_VERTEX_HEIGHT); return height; } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); void addEdge(final String from,
fi... |
@Test public void testGetVertexWidth() { final int width = 10; final int height = 20; final String id = "1"; int actual = tested.getVertexWidth(id); assertEquals(DEFAULT_VERTEX_WIDTH, actual); tested.setVertexSize(id, width, height); actual = tested.getVertexWidth(id); assertEquals(width, actual); } | @Override public int getVertexWidth(final String vertexId) { final int width = verticesWidth.getOrDefault(vertexId, DEFAULT_VERTEX_WIDTH); return width; } | LayeredGraph implements ReorderedGraph { @Override public int getVertexWidth(final String vertexId) { final int width = verticesWidth.getOrDefault(vertexId, DEFAULT_VERTEX_WIDTH); return width; } } | LayeredGraph implements ReorderedGraph { @Override public int getVertexWidth(final String vertexId) { final int width = verticesWidth.getOrDefault(vertexId, DEFAULT_VERTEX_WIDTH); return width; } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); } | LayeredGraph implements ReorderedGraph { @Override public int getVertexWidth(final String vertexId) { final int width = verticesWidth.getOrDefault(vertexId, DEFAULT_VERTEX_WIDTH); return width; } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); void addEdge(final String from,
final S... | LayeredGraph implements ReorderedGraph { @Override public int getVertexWidth(final String vertexId) { final int width = verticesWidth.getOrDefault(vertexId, DEFAULT_VERTEX_WIDTH); return width; } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); void addEdge(final String from,
final S... |
@Test public void testSetVertexSize() { final int width = 15; final int height = 17; final String id = "1"; tested.setVertexSize(id, width, height); final int actualWidth = tested.getVertexWidth(id); final int actualHeight = tested.getVertexHeight(id); assertEquals(width, actualWidth); assertEquals(height, actualHeight... | @Override public void setVertexSize(final String vertexId, final int width, final int height) { verticesWidth.put(vertexId, width); verticesHeight.put(vertexId, height); } | LayeredGraph implements ReorderedGraph { @Override public void setVertexSize(final String vertexId, final int width, final int height) { verticesWidth.put(vertexId, width); verticesHeight.put(vertexId, height); } } | LayeredGraph implements ReorderedGraph { @Override public void setVertexSize(final String vertexId, final int width, final int height) { verticesWidth.put(vertexId, width); verticesHeight.put(vertexId, height); } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); } | LayeredGraph implements ReorderedGraph { @Override public void setVertexSize(final String vertexId, final int width, final int height) { verticesWidth.put(vertexId, width); verticesHeight.put(vertexId, height); } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); void addEdge(final String from,
... | LayeredGraph implements ReorderedGraph { @Override public void setVertexSize(final String vertexId, final int width, final int height) { verticesWidth.put(vertexId, width); verticesHeight.put(vertexId, height); } LayeredGraph(); LayeredGraph(final String[][] edgesMatrix); void addEdge(final String from,
... |
@Test public void testCreateLayout() { final Graph<?, ?> graph = mock(Graph.class); final Iterable nodes = mock(Iterable.class); final HashMap indexByUuid = mock(HashMap.class); final Collection values = mock(Collection.class); final LayeredGraph layeredGraph = mock(LayeredGraph.class); final List layers = mock(List.cl... | @Override public Layout createLayout(final Graph<?, ?> graph) { final Iterable<? extends Node> nodes = graphProcessor.getNodes(graph); final HashMap<String, Node> indexByUuid = createIndex(nodes); final LayeredGraph layeredGraph = createLayeredGraph(indexByUuid.values()); this.cycleBreaker.breakCycle(layeredGraph); thi... | SugiyamaLayoutService extends AbstractLayoutService { @Override public Layout createLayout(final Graph<?, ?> graph) { final Iterable<? extends Node> nodes = graphProcessor.getNodes(graph); final HashMap<String, Node> indexByUuid = createIndex(nodes); final LayeredGraph layeredGraph = createLayeredGraph(indexByUuid.valu... | SugiyamaLayoutService extends AbstractLayoutService { @Override public Layout createLayout(final Graph<?, ?> graph) { final Iterable<? extends Node> nodes = graphProcessor.getNodes(graph); final HashMap<String, Node> indexByUuid = createIndex(nodes); final LayeredGraph layeredGraph = createLayeredGraph(indexByUuid.valu... | SugiyamaLayoutService extends AbstractLayoutService { @Override public Layout createLayout(final Graph<?, ?> graph) { final Iterable<? extends Node> nodes = graphProcessor.getNodes(graph); final HashMap<String, Node> indexByUuid = createIndex(nodes); final LayeredGraph layeredGraph = createLayeredGraph(indexByUuid.valu... | SugiyamaLayoutService extends AbstractLayoutService { @Override public Layout createLayout(final Graph<?, ?> graph) { final Iterable<? extends Node> nodes = graphProcessor.getNodes(graph); final HashMap<String, Node> indexByUuid = createIndex(nodes); final LayeredGraph layeredGraph = createLayeredGraph(indexByUuid.valu... |
@Test public void testDelegateSetRowDraggingEnabled() { uiModel.setRowDraggingEnabled(true); verify(delegate).setRowDraggingEnabled(eq(true)); } | @Override public void setRowDraggingEnabled(final boolean enabled) { delegate.setRowDraggingEnabled(enabled); } | DelegatingGridData implements GridData { @Override public void setRowDraggingEnabled(final boolean enabled) { delegate.setRowDraggingEnabled(enabled); } } | DelegatingGridData implements GridData { @Override public void setRowDraggingEnabled(final boolean enabled) { delegate.setRowDraggingEnabled(enabled); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public void setRowDraggingEnabled(final boolean enabled) { delegate.setRowDraggingEnabled(enabled); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final... | DelegatingGridData implements GridData { @Override public void setRowDraggingEnabled(final boolean enabled) { delegate.setRowDraggingEnabled(enabled); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final... |
@Test public void testCreateIndex() { final Node nodeWithoutBounds = mock(Node.class); final String noBoundsId = "not"; final String id1 = "id1"; final String id2 = "id2"; final Object notHasBoundsInstance = mock(Object.class); final Node n1 = createNode(id1); final Node n2 = createNode(id2); final List<Node> nodes = A... | HashMap<String, Node> createIndex(final Iterable<? extends Node> nodes) { final HashMap<String, Node> indexByUuid = new HashMap<>(); for (final Node n : nodes) { if (!(n.getContent() instanceof HasBounds)) { continue; } indexByUuid.put(n.getUUID(), n); } return indexByUuid; } | SugiyamaLayoutService extends AbstractLayoutService { HashMap<String, Node> createIndex(final Iterable<? extends Node> nodes) { final HashMap<String, Node> indexByUuid = new HashMap<>(); for (final Node n : nodes) { if (!(n.getContent() instanceof HasBounds)) { continue; } indexByUuid.put(n.getUUID(), n); } return inde... | SugiyamaLayoutService extends AbstractLayoutService { HashMap<String, Node> createIndex(final Iterable<? extends Node> nodes) { final HashMap<String, Node> indexByUuid = new HashMap<>(); for (final Node n : nodes) { if (!(n.getContent() instanceof HasBounds)) { continue; } indexByUuid.put(n.getUUID(), n); } return inde... | SugiyamaLayoutService extends AbstractLayoutService { HashMap<String, Node> createIndex(final Iterable<? extends Node> nodes) { final HashMap<String, Node> indexByUuid = new HashMap<>(); for (final Node n : nodes) { if (!(n.getContent() instanceof HasBounds)) { continue; } indexByUuid.put(n.getUUID(), n); } return inde... | SugiyamaLayoutService extends AbstractLayoutService { HashMap<String, Node> createIndex(final Iterable<? extends Node> nodes) { final HashMap<String, Node> indexByUuid = new HashMap<>(); for (final Node n : nodes) { if (!(n.getContent() instanceof HasBounds)) { continue; } indexByUuid.put(n.getUUID(), n); } return inde... |
@Test public void testCreateLayeredGraph() { final Node n1 = createNode("id1"); final Node n2 = createNode("id2"); final List<Node> nodes = Arrays.asList(n1, n2); final LayeredGraph layeredGraph = mock(LayeredGraph.class); doReturn(layeredGraph).when(layoutService).getLayeredGraph(); doNothing().when(layoutService).add... | LayeredGraph createLayeredGraph(final Iterable<? extends Node> nodes) { final LayeredGraph layeredGraph = getLayeredGraph(); for (final Node n : nodes) { addInEdges(layeredGraph, n); addOutEdges(layeredGraph, n); } return layeredGraph; } | SugiyamaLayoutService extends AbstractLayoutService { LayeredGraph createLayeredGraph(final Iterable<? extends Node> nodes) { final LayeredGraph layeredGraph = getLayeredGraph(); for (final Node n : nodes) { addInEdges(layeredGraph, n); addOutEdges(layeredGraph, n); } return layeredGraph; } } | SugiyamaLayoutService extends AbstractLayoutService { LayeredGraph createLayeredGraph(final Iterable<? extends Node> nodes) { final LayeredGraph layeredGraph = getLayeredGraph(); for (final Node n : nodes) { addInEdges(layeredGraph, n); addOutEdges(layeredGraph, n); } return layeredGraph; } @Inject SugiyamaLayoutServi... | SugiyamaLayoutService extends AbstractLayoutService { LayeredGraph createLayeredGraph(final Iterable<? extends Node> nodes) { final LayeredGraph layeredGraph = getLayeredGraph(); for (final Node n : nodes) { addInEdges(layeredGraph, n); addOutEdges(layeredGraph, n); } return layeredGraph; } @Inject SugiyamaLayoutServi... | SugiyamaLayoutService extends AbstractLayoutService { LayeredGraph createLayeredGraph(final Iterable<? extends Node> nodes) { final LayeredGraph layeredGraph = getLayeredGraph(); for (final Node n : nodes) { addInEdges(layeredGraph, n); addOutEdges(layeredGraph, n); } return layeredGraph; } @Inject SugiyamaLayoutServi... |
@Test public void testAddInEdges() { final LayeredGraph layeredGraph = mock(LayeredGraph.class); final Node node = mock(Node.class); final Edge edge = mock(Edge.class); final Node sourceNode = mock(Node.class); final List inEdges = Arrays.asList(edge); final String fromId = "from"; final String toId = "to"; final int w... | void addInEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getInEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String from = getId(edge.getSourceNode()); final String to = getId(n); layeredGraph.addEdge(from, to); layeredGraph.setVertexSize(getId(n), getWidth(n), get... | SugiyamaLayoutService extends AbstractLayoutService { void addInEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getInEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String from = getId(edge.getSourceNode()); final String to = getId(n); layeredGraph.addEdge(from, to);... | SugiyamaLayoutService extends AbstractLayoutService { void addInEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getInEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String from = getId(edge.getSourceNode()); final String to = getId(n); layeredGraph.addEdge(from, to);... | SugiyamaLayoutService extends AbstractLayoutService { void addInEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getInEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String from = getId(edge.getSourceNode()); final String to = getId(n); layeredGraph.addEdge(from, to);... | SugiyamaLayoutService extends AbstractLayoutService { void addInEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getInEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String from = getId(edge.getSourceNode()); final String to = getId(n); layeredGraph.addEdge(from, to);... |
@Test public void testAddOutEdges() { final LayeredGraph layeredGraph = mock(LayeredGraph.class); final Node node = mock(Node.class); final Edge edge = mock(Edge.class); final Node targetNode = mock(Node.class); final List outEdges = Arrays.asList(edge); final String fromId = "from"; final String toId = "to"; final int... | void addOutEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getOutEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String to = getId(edge.getTargetNode()); final String from = getId(n); layeredGraph.addEdge(from, to); layeredGraph.setVertexSize(getId(n), getWidth(n), g... | SugiyamaLayoutService extends AbstractLayoutService { void addOutEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getOutEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String to = getId(edge.getTargetNode()); final String from = getId(n); layeredGraph.addEdge(from, to... | SugiyamaLayoutService extends AbstractLayoutService { void addOutEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getOutEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String to = getId(edge.getTargetNode()); final String from = getId(n); layeredGraph.addEdge(from, to... | SugiyamaLayoutService extends AbstractLayoutService { void addOutEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getOutEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String to = getId(edge.getTargetNode()); final String from = getId(n); layeredGraph.addEdge(from, to... | SugiyamaLayoutService extends AbstractLayoutService { void addOutEdges(final LayeredGraph layeredGraph, final Node n) { for (final Object e : n.getOutEdges()) { if (e instanceof Edge) { final Edge edge = (Edge) e; final String to = getId(edge.getTargetNode()); final String from = getId(n); layeredGraph.addEdge(from, to... |
@Test public void testGetHeight() { final Node n = mock(Node.class); final HasBounds hasBounds = mock(HasBounds.class); final Bounds bounds = mock(Bounds.class); final double height = 15; final int expected = (int) height; when(bounds.getHeight()).thenReturn(height); when(hasBounds.getBounds()).thenReturn(bounds); when... | int getHeight(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getHeight(); } | SugiyamaLayoutService extends AbstractLayoutService { int getHeight(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getHeight(); } } | SugiyamaLayoutService extends AbstractLayoutService { int getHeight(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getHeight(); } @Inject SugiyamaLayoutService(final CycleBreaker cycleBreaker,
final VertexLayerer vertexLayerer,
fi... | SugiyamaLayoutService extends AbstractLayoutService { int getHeight(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getHeight(); } @Inject SugiyamaLayoutService(final CycleBreaker cycleBreaker,
final VertexLayerer vertexLayerer,
fi... | SugiyamaLayoutService extends AbstractLayoutService { int getHeight(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getHeight(); } @Inject SugiyamaLayoutService(final CycleBreaker cycleBreaker,
final VertexLayerer vertexLayerer,
fi... |
@Test public void testGetWidth() { final Node n = mock(Node.class); final HasBounds hasBounds = mock(HasBounds.class); final Bounds bounds = mock(Bounds.class); final double width = 17; final int expected = (int) width; when(bounds.getWidth()).thenReturn(width); when(hasBounds.getBounds()).thenReturn(bounds); when(n.ge... | int getWidth(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getWidth(); } | SugiyamaLayoutService extends AbstractLayoutService { int getWidth(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getWidth(); } } | SugiyamaLayoutService extends AbstractLayoutService { int getWidth(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getWidth(); } @Inject SugiyamaLayoutService(final CycleBreaker cycleBreaker,
final VertexLayerer vertexLayerer,
fina... | SugiyamaLayoutService extends AbstractLayoutService { int getWidth(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getWidth(); } @Inject SugiyamaLayoutService(final CycleBreaker cycleBreaker,
final VertexLayerer vertexLayerer,
fina... | SugiyamaLayoutService extends AbstractLayoutService { int getWidth(final Node n) { return (int) ((HasBounds) n.getContent()).getBounds().getWidth(); } @Inject SugiyamaLayoutService(final CycleBreaker cycleBreaker,
final VertexLayerer vertexLayerer,
fina... |
@Test public void testAcyclicGraphs() { final LayeredGraph graph = new LayeredGraph(Graphs.SIMPLE_ACYCLIC); final ReverseEdgesCycleBreaker breaker = new ReverseEdgesCycleBreaker(); breaker.breakCycle(graph); assertTrue(graph.isAcyclic()); } | @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } |
@Test public void testSimpleCyclicGraph() { final LayeredGraph graph = new LayeredGraph(Graphs.SIMPLE_CYCLIC); graph.addEdge("A", "B"); graph.addEdge("B", "C"); graph.addEdge("C", "D"); graph.addEdge("D", "A"); assertFalse(graph.isAcyclic()); final ReverseEdgesCycleBreaker breaker = new ReverseEdgesCycleBreaker(); brea... | @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } |
@Test public void testCyclicGraph1() { final LayeredGraph graph = new LayeredGraph(Graphs.CYCLIC_GRAPH_1); final ReverseEdgesCycleBreaker breaker = new ReverseEdgesCycleBreaker(); breaker.breakCycle(graph); assertTrue(graph.isAcyclic()); } | @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } |
@Test public void testCyclicGraphFull() { final LayeredGraph graph = new LayeredGraph(Graphs.Full); assertFalse(graph.isAcyclic()); final ReverseEdgesCycleBreaker breaker = new ReverseEdgesCycleBreaker(); breaker.breakCycle(graph); assertTrue(graph.isAcyclic()); } | @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } | ReverseEdgesCycleBreaker implements CycleBreaker { @Override public void breakCycle(final ReorderedGraph graph) { this.graph = (LayeredGraph) graph; for (final String vertex : this.graph.getVertices()) { visit(vertex); } } ReverseEdgesCycleBreaker(); @Override void breakCycle(final ReorderedGraph graph); } |
@Test public void testDelegateIsRowDraggingEnabled() { uiModel.isRowDraggingEnabled(); verify(delegate).isRowDraggingEnabled(); } | @Override public boolean isRowDraggingEnabled() { return delegate.isRowDraggingEnabled(); } | DelegatingGridData implements GridData { @Override public boolean isRowDraggingEnabled() { return delegate.isRowDraggingEnabled(); } } | DelegatingGridData implements GridData { @Override public boolean isRowDraggingEnabled() { return delegate.isRowDraggingEnabled(); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public boolean isRowDraggingEnabled() { return delegate.isRowDraggingEnabled(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
... | DelegatingGridData implements GridData { @Override public boolean isRowDraggingEnabled() { return delegate.isRowDraggingEnabled(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
... |
@Test public void getLayoutInformationThreshold() { when(n1.getUUID()).thenReturn(UUID.uuid()); when(n2.getUUID()).thenReturn(UUID.uuid()); final GraphNodeStoreImpl store = new GraphNodeStoreImpl(); store.add(n1); doCallRealMethod().when(layoutService).getLayoutInformationThreshold(graph); when(graph.nodes()).thenRetur... | protected double getLayoutInformationThreshold(final Graph<?, ?> graph) { final List<Node> list = new ArrayList<>(); graph.nodes().iterator().forEachRemaining(list::add); return list.size() / 4.0D; } | AbstractLayoutService implements LayoutService { protected double getLayoutInformationThreshold(final Graph<?, ?> graph) { final List<Node> list = new ArrayList<>(); graph.nodes().iterator().forEachRemaining(list::add); return list.size() / 4.0D; } } | AbstractLayoutService implements LayoutService { protected double getLayoutInformationThreshold(final Graph<?, ?> graph) { final List<Node> list = new ArrayList<>(); graph.nodes().iterator().forEachRemaining(list::add); return list.size() / 4.0D; } } | AbstractLayoutService implements LayoutService { protected double getLayoutInformationThreshold(final Graph<?, ?> graph) { final List<Node> list = new ArrayList<>(); graph.nodes().iterator().forEachRemaining(list::add); return list.size() / 4.0D; } @Override boolean hasLayoutInformation(final Graph<?, ?> graph); @Over... | AbstractLayoutService implements LayoutService { protected double getLayoutInformationThreshold(final Graph<?, ?> graph) { final List<Node> list = new ArrayList<>(); graph.nodes().iterator().forEachRemaining(list::add); return list.size() / 4.0D; } @Override boolean hasLayoutInformation(final Graph<?, ?> graph); @Over... |
@Test public void hasLayoutInformation() { when(n1.getUUID()).thenReturn(UUID.uuid()); when(n2.getUUID()).thenReturn(UUID.uuid()); final GraphNodeStoreImpl store = new GraphNodeStoreImpl(); store.add(n2); store.add(n1); doCallRealMethod().when(layoutService).hasLayoutInformation(graph); doCallRealMethod().when(layoutSe... | @Override public boolean hasLayoutInformation(final Graph<?, ?> graph) { final double threshold = getLayoutInformationThreshold(graph); int nodesWithLayout = 0; for (final Node n : graph.nodes()) { final Object content = n.getContent(); if (content instanceof HasBounds) { if (!isNullOrCloseToZero(((HasBounds) content).... | AbstractLayoutService implements LayoutService { @Override public boolean hasLayoutInformation(final Graph<?, ?> graph) { final double threshold = getLayoutInformationThreshold(graph); int nodesWithLayout = 0; for (final Node n : graph.nodes()) { final Object content = n.getContent(); if (content instanceof HasBounds) ... | AbstractLayoutService implements LayoutService { @Override public boolean hasLayoutInformation(final Graph<?, ?> graph) { final double threshold = getLayoutInformationThreshold(graph); int nodesWithLayout = 0; for (final Node n : graph.nodes()) { final Object content = n.getContent(); if (content instanceof HasBounds) ... | AbstractLayoutService implements LayoutService { @Override public boolean hasLayoutInformation(final Graph<?, ?> graph) { final double threshold = getLayoutInformationThreshold(graph); int nodesWithLayout = 0; for (final Node n : graph.nodes()) { final Object content = n.getContent(); if (content instanceof HasBounds) ... | AbstractLayoutService implements LayoutService { @Override public boolean hasLayoutInformation(final Graph<?, ?> graph) { final double threshold = getLayoutInformationThreshold(graph); int nodesWithLayout = 0; for (final Node n : graph.nodes()) { final Object content = n.getContent(); if (content instanceof HasBounds) ... |
@Test @SuppressWarnings("unchecked") public void testEvaluate() { StatefulGraphEvaluationState.StatefulContainmentState containmentState = new StatefulGraphEvaluationState.StatefulContainmentState(); when(state.getContainmentState()).thenReturn(containmentState); Element parent = new NodeImpl<>("parent"); Node child = ... | @Override public RuleViolations evaluate(final GraphEvaluationContext context) { ((AbstractGraphEvaluationContext) context).setState(this::getState); return StatefulGraphEvaluationContexts.evaluate(context, c -> ruleManager.evaluate(ruleSet, c)); } | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { ((AbstractGraphEvaluationContext) context).setState(this::getState); return StatefulGraphEvaluationContexts.evaluate(context, c -> ruleManager.evaluate(r... | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { ((AbstractGraphEvaluationContext) context).setState(this::getState); return StatefulGraphEvaluationContexts.evaluate(context, c -> ruleManager.evaluate(r... | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { ((AbstractGraphEvaluationContext) context).setState(this::getState); return StatefulGraphEvaluationContexts.evaluate(context, c -> ruleManager.evaluate(r... | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { ((AbstractGraphEvaluationContext) context).setState(this::getState); return StatefulGraphEvaluationContexts.evaluate(context, c -> ruleManager.evaluate(r... |
@Test public void testClear() { tested.clear(); verify(state, times(1)).clear(); } | public void clear() { getState().clear(); } | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { public void clear() { getState().clear(); } } | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { public void clear() { getState().clear(); } ContextualGraphCommandExecutionContext(final DefinitionManager definitionManager,
final FactoryManager factoryManager,
... | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { public void clear() { getState().clear(); } ContextualGraphCommandExecutionContext(final DefinitionManager definitionManager,
final FactoryManager factoryManager,
... | ContextualGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { public void clear() { getState().clear(); } ContextualGraphCommandExecutionContext(final DefinitionManager definitionManager,
final FactoryManager factoryManager,
... |
@Test @SuppressWarnings("unchecked") public void testEvaluate() { when(contextBuilder.containment(any(Element.class), any(Node.class))).thenReturn(mock(NodeContainmentContext.class)); RuleViolations result = tested.evaluate(builder -> builder.containment(mock(Element.class), mock(Node.class))); assertEquals(EmptyRuleVi... | @Override public RuleViolations evaluate(final GraphEvaluationContext context) { return EmptyRuleViolations.INSTANCE; } | DirectGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { return EmptyRuleViolations.INSTANCE; } } | DirectGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { return EmptyRuleViolations.INSTANCE; } DirectGraphCommandExecutionContext(final DefinitionManager definitionManager,
... | DirectGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { return EmptyRuleViolations.INSTANCE; } DirectGraphCommandExecutionContext(final DefinitionManager definitionManager,
... | DirectGraphCommandExecutionContext extends AbstractGraphCommandExecutionContext { @Override public RuleViolations evaluate(final GraphEvaluationContext context) { return EmptyRuleViolations.INSTANCE; } DirectGraphCommandExecutionContext(final DefinitionManager definitionManager,
... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertTrue(parentOutEdges.isEmpty()); assertTrue(candidateInEdges.isEmpty()); verify(graphIndex, times(1)).removeE... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); final Node<?, Edge> candidate = getCandidate(contex... | UnDockNodeCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); fi... | UnDockNodeCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); fi... | UnDockNodeCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); fi... | UnDockNodeCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); fi... |
@Test @SuppressWarnings("unchecked") public void testExecute() { final List sourceOutEdges = spy(new ArrayList()); final List targetInEdges = spy(new ArrayList()); when(source.getOutEdges()).thenReturn(sourceOutEdges); when(target.getInEdges()).thenReturn(targetInEdges); CommandResult<RuleViolation> result = tested.exe... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = getCandidateEdge(context); getMutableIndex(context).removeEdge(edg... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... |
@Test @SuppressWarnings("unchecked") public void testExecuteCheckFailed() { final RuleViolations FAILED_VIOLATIONS = new DefaultRuleViolations() .addViolation(new ContainmentRuleViolation(graph.getUUID(), UUID)); when(ruleManager.evaluate(any(RuleSet.class), any(RuleEvaluationContext.class))).thenReturn(FAILED_VIOLATIO... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = getCandidateEdge(context); getMutableIndex(context).removeEdge(edg... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... | DeleteConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> result = super.execute(context); if (!CommandUtils.isError(result)) { final Edge<? extends ViewConnector, Node> edge = get... |
@Test @SuppressWarnings("unchecked") public void testInitializeCommands() { this.tested = spy(tested); tested.initialize(graphCommandExecutionContext); ArgumentCaptor<Command> commandArgumentCaptor = ArgumentCaptor.forClass(Command.class); verify(tested, times(2)).addCommand(commandArgumentCaptor.capture()); List<Comma... | protected AddDockedNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.addCommand(new RegisterNodeCommand(candidate)) .addCommand(new DockNodeCommand(getParent(context), candidate)); return this; } | AddDockedNodeCommand extends AbstractGraphCompositeCommand { protected AddDockedNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.addCommand(new RegisterNodeCommand(candidate)) .addCommand(new DockNodeCommand(getParent(context), candidate)); return this; } } | AddDockedNodeCommand extends AbstractGraphCompositeCommand { protected AddDockedNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.addCommand(new RegisterNodeCommand(candidate)) .addCommand(new DockNodeCommand(getParent(context), candidate)); return this; } AddDockedNod... | AddDockedNodeCommand extends AbstractGraphCompositeCommand { protected AddDockedNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.addCommand(new RegisterNodeCommand(candidate)) .addCommand(new DockNodeCommand(getParent(context), candidate)); return this; } AddDockedNod... | AddDockedNodeCommand extends AbstractGraphCompositeCommand { protected AddDockedNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.addCommand(new RegisterNodeCommand(candidate)) .addCommand(new DockNodeCommand(getParent(context), candidate)); return this; } AddDockedNod... |
@Test @SuppressWarnings("unchecked") public void testUndo() { CommandResult<RuleViolation> result = tested.undo(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); verify(graph, times(1)).removeNode(eq(UUID)); verify(graphIndex, times(1)).removeNode(eq(node)); verify(graphIndex, time... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final SafeDeleteNodeCommand undoCommand = new SafeDeleteNodeCommand(getCandidate()); return undoCommand.execute(context); } | AddNodeCommand extends RegisterNodeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final SafeDeleteNodeCommand undoCommand = new SafeDeleteNodeCommand(getCandidate()); return undoCommand.execute(context); } } | AddNodeCommand extends RegisterNodeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final SafeDeleteNodeCommand undoCommand = new SafeDeleteNodeCommand(getCandidate()); return undoCommand.execute(context); } AddNodeCommand(final @M... | AddNodeCommand extends RegisterNodeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final SafeDeleteNodeCommand undoCommand = new SafeDeleteNodeCommand(getCandidate()); return undoCommand.execute(context); } AddNodeCommand(final @M... | AddNodeCommand extends RegisterNodeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final SafeDeleteNodeCommand undoCommand = new SafeDeleteNodeCommand(getCandidate()); return undoCommand.execute(context); } AddNodeCommand(final @M... |
@Test public void testDelegateSetMerged() { uiModel.setMerged(true); verify(delegate).setMerged(eq(true)); } | @Override public void setMerged(final boolean isMerged) { delegate.setMerged(isMerged); } | DelegatingGridData implements GridData { @Override public void setMerged(final boolean isMerged) { delegate.setMerged(isMerged); } } | DelegatingGridData implements GridData { @Override public void setMerged(final boolean isMerged) { delegate.setMerged(isMerged); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public void setMerged(final boolean isMerged) { delegate.setMerged(isMerged); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
... | DelegatingGridData implements GridData { @Override public void setMerged(final boolean isMerged) { delegate.setMerged(isMerged); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
... |
@Test @SuppressWarnings("unchecked") public void testCompositeTheRightCommands() { tested.initialize(graphCommandExecutionContext); final List<Command<GraphCommandExecutionContext, RuleViolation>> commands = tested.getCommands(); assertEquals(3, commands.size()); DeleteConnectorCommand deleteConnectorCommand = (DeleteC... | @Override @SuppressWarnings("unchecked") protected DeleteElementsCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); if (null == elements) { elements = uuids.stream() .map(uuid -> context.getGraphIndex().get(uuid)) .collect(Collectors.toList()); } if (elements.isEmpty()) { throw ... | DeleteElementsCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected DeleteElementsCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); if (null == elements) { elements = uuids.stream() .map(uuid -> context.getGraphIndex().get(uuid)) .co... | DeleteElementsCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected DeleteElementsCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); if (null == elements) { elements = uuids.stream() .map(uuid -> context.getGraphIndex().get(uuid)) .co... | DeleteElementsCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected DeleteElementsCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); if (null == elements) { elements = uuids.stream() .map(uuid -> context.getGraphIndex().get(uuid)) .co... | DeleteElementsCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected DeleteElementsCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); if (null == elements) { elements = uuids.stream() .map(uuid -> context.getGraphIndex().get(uuid)) .co... |
@Test public void testCheck() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 0); CommandResult<RuleViolation> result = tested.check(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 1); result = tested.check(graph... | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... |
@Test(expected = IllegalArgumentException.class) public void testInvalidIndex() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, -1); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... |
@Test(expected = IllegalArgumentException.class) public void testInvalidIndexDuringExecute() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, -1); tested.execute(graphCommandExecutionContext); } | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test(expected = IllegalArgumentException.class) public void testInvalidCPIndex() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 4); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... |
@Test(expected = IllegalArgumentException.class) public void testInvalidCPIndexDuringExecute() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 4); tested.execute(graphCommandExecutionContext); } | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test(expected = IllegalArgumentException.class) public void testInvalidCP() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 2); newControlPoint.setLocation(null); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } } | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... | AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointComman... |
@Test(expected = IllegalArgumentException.class) public void testInvalidCPDuringExecute() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 2); newControlPoint.setLocation(null); tested.execute(graphCommandExecutionContext); } | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test public void testAddControlPointAt0() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 0); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isErr... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test public void testAddControlPointAt1() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 1); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isErr... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test public void testDelegateIsMerged() { uiModel.isMerged(); verify(delegate).isMerged(); } | @Override public boolean isMerged() { return delegate.isMerged(); } | DelegatingGridData implements GridData { @Override public boolean isMerged() { return delegate.isMerged(); } } | DelegatingGridData implements GridData { @Override public boolean isMerged() { return delegate.isMerged(); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public boolean isMerged() { return delegate.isMerged(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
final... | DelegatingGridData implements GridData { @Override public boolean isMerged() { return delegate.isMerged(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
final... |
@Test public void testGetItemDefinitionsWithNamespace() { final Definitions definitions = mock(Definitions.class); final Import anImport = mock(Import.class); final ItemDefinition itemDefinition1 = new TItemDefinition(); final ItemDefinition itemDefinition2 = new TItemDefinition(); final ItemDefinition itemDefinition3 ... | List<ItemDefinition> getItemDefinitionsWithNamespace(final Definitions definitions, final Import anImport) { final List<ItemDefinition> itemDefinitions = definitions.getItemDefinition(); final String prefix = anImport.getName(); return itemDefinitions .stream() .map(itemDefinition -> withNamespace(itemDefinition, prefi... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { List<ItemDefinition> getItemDefinitionsWithNamespace(final Definitions definitions, final Import anImport) { final List<ItemDefinition> itemDefinitions = definitions.getItemDefinition(); final String prefix = anImport.getName(); ... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { List<ItemDefinition> getItemDefinitionsWithNamespace(final Definitions definitions, final Import anImport) { final List<ItemDefinition> itemDefinitions = definitions.getItemDefinition(); final String prefix = anImport.getName(); ... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { List<ItemDefinition> getItemDefinitionsWithNamespace(final Definitions definitions, final Import anImport) { final List<ItemDefinition> itemDefinitions = definitions.getItemDefinition(); final String prefix = anImport.getName(); ... | DMNMarshallerImportsHelperStandaloneImpl implements DMNMarshallerImportsHelperStandalone { List<ItemDefinition> getItemDefinitionsWithNamespace(final Definitions definitions, final Import anImport) { final List<ItemDefinition> itemDefinitions = definitions.getItemDefinition(); final String prefix = anImport.getName(); ... |
@Test public void testAddControlPointAt2() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 2); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isErr... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test public void testAddControlPointAt3() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 3); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isErr... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test public void testAddControlPointFirstTime() { when(viewConnector.getControlPoints()).thenReturn(null); tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 0); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints()) ? 0 : edgeControlPoints.getControlPoints().length; final Con... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... | AddControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = Objects.isNull(edgeControlPoints.getControlPoints())... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertFalse(parent.getOutEdges().isEmpty()); assertFalse(candidate.getInEdges().isEmpty()); Edge edge = (Edge) par... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); final Node<?, Edge> ... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... |
@Test @SuppressWarnings("unchecked") public void testExecuteCheckFailed() { final RuleViolations FAILED_VIOLATIONS = new DefaultRuleViolations() .addViolation(new ContainmentRuleViolation(graph.getUUID(), PARENT_UUID)); when(ruleManager.evaluate(any(RuleSet.class), any(RuleEvaluationContext.class))).thenReturn(FAILED_V... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); final Node<?, Edge> ... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... | DockNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> pa... |
@Test @SuppressWarnings("unchecked") public void testInitializeCommands() { this.tested = spy(tested); tested.initialize(graphCommandExecutionContext); ArgumentCaptor<Command> commandArgumentCaptor = ArgumentCaptor.forClass(Command.class); verify(tested, times(3)).addCommand(commandArgumentCaptor.capture()); List<Comma... | @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addCommand(getSetChildNodeCommand(parent, candidate)); if (null != lo... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... |
@Test @SuppressWarnings("unchecked") public void testInitializeWithNoPositionCommands() { this.tested = spy(new AddChildNodeCommand(PARENT_UUID, candidate, null)); tested.initialize(graphCommandExecutionContext); ArgumentCaptor<Command> commandArgumentCaptor = ArgumentCaptor.forClass(Command.class); verify(tested, time... | @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addCommand(getSetChildNodeCommand(parent, candidate)); if (null != lo... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @SuppressWarnings("unchecked") protected AddChildNodeCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); final Node<?, Edge> parent = getParent(context); this.addCommand(getRegisterNodeCommand(candidate)); this.addComman... |
@Test @SuppressWarnings("unchecked") public void testAllow() { CommandResult<RuleViolation> result = tested.allow(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); List<Command<GraphCommandExecutionContext, RuleViolation>> commands = tested.getCommands(); assertNotNull(commands); a... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); final Collection<RuleViolation> containmentRuleViolations = ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... |
@Test @SuppressWarnings("unchecked") public void testAllowNoRules() { useAllowedExecutionContext(); CommandResult<RuleViolation> result = tested.allow(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); verify(ruleManager, times(0)).evaluate(eq(ruleSet), any(RuleEvaluationContext.cla... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); final Collection<RuleViolation> containmentRuleViolations = ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... |
@Test @SuppressWarnings("unchecked") public void testNotAllowed() { final RuleViolations FAILED_VIOLATIONS = new DefaultRuleViolations() .addViolation(new ContainmentRuleViolation(graph.getUUID(), PARENT_UUID)); when(ruleManager.evaluate(any(RuleSet.class), any(RuleEvaluationContext.class))).thenReturn(FAILED_VIOLATION... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); final Collection<RuleViolation> containmentRuleViolations = ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... | AddChildNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { ensureInitialized(context); final Element<? extends Definition<?>> parent = (Element<? extends Definition<?>>) getParent(context); ... |
@Test public void testDelegateUpdateColumn() { uiModel.updateColumn(0, gridColumn); verify(delegate).updateColumn(eq(0), eq(gridColumn)); } | @Override public void updateColumn(final int index, final GridColumn<?> column) { delegate.updateColumn(index, column); } | DelegatingGridData implements GridData { @Override public void updateColumn(final int index, final GridColumn<?> column) { delegate.updateColumn(index, column); } } | DelegatingGridData implements GridData { @Override public void updateColumn(final int index, final GridColumn<?> column) { delegate.updateColumn(index, column); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public void updateColumn(final int index, final GridColumn<?> column) { delegate.updateColumn(index, column); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRo... | DelegatingGridData implements GridData { @Override public void updateColumn(final int index, final GridColumn<?> column) { delegate.updateColumn(index, column); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRo... |
@Test @SuppressWarnings("unchecked") public void testExecute() { assertEquals(CommandResult.Type.INFO, command.execute(graphCommandExecutionContext).getType()); verify(propertyAdapter).getValue(eq(domainObject.getNameProperty())); verify(propertyAdapter).setValue(eq(domainObject.getNameProperty()), eq(PROPERTY_VALUE));... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final DefinitionManager definitionManager = context.getDefinitionManager(); final Object p = definitionManager.adapters().forDefinition().getProperty(domainObject, field).get(); final Adapt... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final DefinitionManager definitionManager = context.getDefinitionManager(); final Object p = definitionManager.adapters... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final DefinitionManager definitionManager = context.getDefinitionManager(); final Object p = definitionManager.adapters... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final DefinitionManager definitionManager = context.getDefinitionManager(); final Object p = definitionManager.adapters... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final DefinitionManager definitionManager = context.getDefinitionManager(); final Object p = definitionManager.adapters... |
@Test @SuppressWarnings("unchecked") public void testUndo() { command.execute(graphCommandExecutionContext); verify(propertyAdapter).getValue(eq(domainObject.getNameProperty())); verify(propertyAdapter).setValue(eq(domainObject.getNameProperty()), eq(PROPERTY_VALUE)); assertEquals(CommandResult.Type.INFO, command.undo(... | @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final UpdateDomainObjectPropertyValueCommand undoCommand = new UpdateDomainObjectPropertyValueCommand(domainObject, field, oldValue); return undoCommand.execute(context); } | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final UpdateDomainObjectPropertyValueCommand undoCommand = new UpdateDomainObjectPropertyValueCommand(domainObject, field, oldValue); return undoCommand.... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final UpdateDomainObjectPropertyValueCommand undoCommand = new UpdateDomainObjectPropertyValueCommand(domainObject, field, oldValue); return undoCommand.... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final UpdateDomainObjectPropertyValueCommand undoCommand = new UpdateDomainObjectPropertyValueCommand(domainObject, field, oldValue); return undoCommand.... | UpdateDomainObjectPropertyValueCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final UpdateDomainObjectPropertyValueCommand undoCommand = new UpdateDomainObjectPropertyValueCommand(domainObject, field, oldValue); return undoCommand.... |
@Test @SuppressWarnings("unchecked") public void testDeleteStartNode() { this.tested = new SafeDeleteNodeCommand(graphHolder.startNode); final CommandResult<RuleViolation> result = tested.allow(graphTestHandler.graphCommandExecutionContext); final List<Command<GraphCommandExecutionContext, RuleViolation>> commands = te... | public Node<?, Edge> getNode() { return node; } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... |
@Test @SuppressWarnings("unchecked") public void testDeleteEndNode() { this.tested = new SafeDeleteNodeCommand(graphHolder.endNode); final CommandResult<RuleViolation> result = tested.allow(graphTestHandler.graphCommandExecutionContext); final List<Command<GraphCommandExecutionContext, RuleViolation>> commands = tested... | public Node<?, Edge> getNode() { return node; } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... |
@Test @SuppressWarnings("unchecked") public void testDeleteIntermediateNode() { this.tested = new SafeDeleteNodeCommand(graphHolder.intermNode); final CommandResult<RuleViolation> result = tested.allow(graphTestHandler.graphCommandExecutionContext); final List<Command<GraphCommandExecutionContext, RuleViolation>> comma... | public Node<?, Edge> getNode() { return node; } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Node<?, Edge> getNode() { return node; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); SafeDeleteNodeCommand(final Node<?, Edge> node); SafeDele... |
@Test public void testGetSafeDeleteCallback() { final Node node = mock(Node.class); when(node.getUUID()).thenReturn("uuid"); final SafeDeleteNodeCommand.SafeDeleteNodeCommandCallback callback = mock(SafeDeleteNodeCommand.SafeDeleteNodeCommandCallback.class); final SafeDeleteNodeCommand command = new SafeDeleteNodeComma... | public Optional<SafeDeleteNodeCommandCallback> getSafeDeleteCallback() { return safeDeleteCallback; } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Optional<SafeDeleteNodeCommandCallback> getSafeDeleteCallback() { return safeDeleteCallback; } } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Optional<SafeDeleteNodeCommandCallback> getSafeDeleteCallback() { return safeDeleteCallback; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); Safe... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Optional<SafeDeleteNodeCommandCallback> getSafeDeleteCallback() { return safeDeleteCallback; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); Safe... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { public Optional<SafeDeleteNodeCommandCallback> getSafeDeleteCallback() { return safeDeleteCallback; } SafeDeleteNodeCommand(final @MapsTo("candidateUUID") String candidateUUID,
final @MapsTo("options") Options options); Safe... |
@Test public void testCreateChangeParentCommands() { final Node node = mock(Node.class); final SafeDeleteNodeCommand.SafeDeleteNodeCommandCallback callback = mock(SafeDeleteNodeCommand.SafeDeleteNodeCommandCallback.class); final Element<?> canvas = mock(Element.class); final Node canvasNode = mock(Node.class); final No... | void createChangeParentCommands(final Element<?> canvas, final Node<?, Edge> candidate) { final List<Node> childNodes = GraphUtils.getChildNodes(candidate); for (final Node n : childNodes) { safeDeleteCallback.ifPresent(c -> c.moveChildToCanvasRoot(canvas.asNode(), n)); } } | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { void createChangeParentCommands(final Element<?> canvas, final Node<?, Edge> candidate) { final List<Node> childNodes = GraphUtils.getChildNodes(candidate); for (final Node n : childNodes) { safeDeleteCallback.ifPresent(c -> c.moveChildToCanvasRoot(canvas.as... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { void createChangeParentCommands(final Element<?> canvas, final Node<?, Edge> candidate) { final List<Node> childNodes = GraphUtils.getChildNodes(candidate); for (final Node n : childNodes) { safeDeleteCallback.ifPresent(c -> c.moveChildToCanvasRoot(canvas.as... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { void createChangeParentCommands(final Element<?> canvas, final Node<?, Edge> candidate) { final List<Node> childNodes = GraphUtils.getChildNodes(candidate); for (final Node n : childNodes) { safeDeleteCallback.ifPresent(c -> c.moveChildToCanvasRoot(canvas.as... | SafeDeleteNodeCommand extends AbstractGraphCompositeCommand { void createChangeParentCommands(final Element<?> canvas, final Node<?, Edge> candidate) { final List<Node> childNodes = GraphUtils.getChildNodes(candidate); for (final Node n : childNodes) { safeDeleteCallback.ifPresent(c -> c.moveChildToCanvasRoot(canvas.as... |
@Test public void testChecks() { tested = new DeleteControlPointCommand(EDGE_UUID, 0); CommandResult<RuleViolation> result = tested.check(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); tested = new DeleteControlPointCommand(EDGE_UUID, 1); result = tested.check(graphCommandExecutionContext); a... | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } } | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... |
@Test(expected = IllegalArgumentException.class) public void testInvalidIndex() { tested = new DeleteControlPointCommand(EDGE_UUID, -1); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } } | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... |
@Test(expected = IllegalArgumentException.class) public void testIndexForbidden() { tested = new DeleteControlPointCommand(EDGE_UUID, 3); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } } | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(fin... |
@Test public void testDelegateClearSelections() { uiModel.clearSelections(); verify(delegate).clearSelections(); } | @Override public void clearSelections() { delegate.clearSelections(); } | DelegatingGridData implements GridData { @Override public void clearSelections() { delegate.clearSelections(); } } | DelegatingGridData implements GridData { @Override public void clearSelections() { delegate.clearSelections(); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public void clearSelections() { delegate.clearSelections(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
f... | DelegatingGridData implements GridData { @Override public void clearSelections() { delegate.clearSelections(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
f... |
@Test(expected = IllegalArgumentException.class) public void testInvalidIndexDuringExecute() { tested = new DeleteControlPointCommand(EDGE_UUID, -1); tested.execute(graphCommandExecutionContext); } | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; final ControlPoint[] cps = new ControlPoint[size - 1]; for (int i = ... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... |
@Test(expected = IllegalArgumentException.class) public void testIndexForbiddenDuringExecute() { tested = new DeleteControlPointCommand(EDGE_UUID, 3); tested.execute(graphCommandExecutionContext); } | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; final ControlPoint[] cps = new ControlPoint[size - 1]; for (int i = ... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... |
@Test public void testDeleteControlPointAt0() { tested = new DeleteControlPointCommand(EDGE_UUID, 0); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isError(result))... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; final ControlPoint[] cps = new ControlPoint[size - 1]; for (int i = ... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... |
@Test public void testDeleteControlPointAt1() { tested = new DeleteControlPointCommand(EDGE_UUID, 1); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isError(result))... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; final ControlPoint[] cps = new ControlPoint[size - 1]; for (int i = ... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... |
@Test public void testDeleteControlPointAt2() { tested = new DeleteControlPointCommand(EDGE_UUID, 2); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(ControlPoint[].class); assertFalse(CommandUtils.isError(result))... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; final ControlPoint[] cps = new ControlPoint[size - 1]; for (int i = ... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... | DeleteControlPointCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { check(context); final HasControlPoints edgeControlPoints = getEdgeControlPoints(context); final int size = edgeControlPoints.getControlPoints().length; fina... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertTrue(parentOutEdges.isEmpty()); assertTrue(candidateInEdges.isEmpty()); verify(graphIndex, times(1)).removeE... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); getCandidates(context).forEach(candidate -> removeC... | RemoveChildrenCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context)... | RemoveChildrenCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context)... | RemoveChildrenCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context)... | RemoveChildrenCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context)... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertFalse(parent.getOutEdges().isEmpty()); assertFalse(candidate.getInEdges().isEmpty()); Edge edge = (Edge) par... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); final Node<?, Edge> ... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... |
@Test @SuppressWarnings("unchecked") public void testExecuteCheckFailed() { final RuleViolations FAILED_VIOLATIONS = new DefaultRuleViolations() .addViolation(new ContainmentRuleViolation(graph.getUUID(), PARENT_UUID)); when(ruleManager.evaluate(any(RuleSet.class), any(RuleEvaluationContext.class))).thenReturn(FAILED_V... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); final Node<?, Edge> ... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... | SetParentNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edg... |
@Test @SuppressWarnings("unchecked") public void testAllow() { CommandResult<RuleViolation> result = tested.allow(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); final ArgumentCaptor<RuleEvaluationContext> contextCaptor = ArgumentCaptor.forClass(RuleEvaluationContext.class); veri... | @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(context).removeEdge(edge); } return results; } | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... |
@Test @SuppressWarnings("unchecked") public void testAllowNoRules() { useAllowedExecutionContext(); CommandResult<RuleViolation> result = tested.allow(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); verify(ruleManager, times(0)).evaluate(any(RuleSet.class), any(RuleEvaluationCont... | @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(context).removeEdge(edge); } return results; } | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override public CommandResult<RuleViolation> allow(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.allow(context); if (CommandUtils.isError(results)) { getMutableIndex(co... |
@Test public void testDelegateGetSelectedCells() { uiModel.getSelectedCells(); verify(delegate).getSelectedCells(); } | @Override public List<SelectedCell> getSelectedCells() { return delegate.getSelectedCells(); } | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedCells() { return delegate.getSelectedCells(); } } | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedCells() { return delegate.getSelectedCells(); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedCells() { return delegate.getSelectedCells(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
... | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedCells() { return delegate.getSelectedCells(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,
... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertTrue(node.getOutEdges().size() == 1); assertEquals(edge, node.getOutEdges().get(0)); verify(graphIndex, time... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.execute(context); if (CommandUtils.isError(results)) { getMutableIndex(context).removeEdge(edge); ... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.execute(context); if (CommandUtils.isE... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.execute(context); if (CommandUtils.isE... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.execute(context); if (CommandUtils.isE... | AddConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { getMutableIndex(context).addEdge(edge); final CommandResult<RuleViolation> results = super.execute(context); if (CommandUtils.isE... |
@Test @SuppressWarnings("unchecked") public void testUndo() { tested.removed = node; CommandResult<RuleViolation> result = tested.undo(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); verify(graph, times(2)).addNode(any(Node.class)); verify(graphIndex, times(1)).addNode(any(Node.c... | @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final AddNodeCommand undoCommand = new AddNodeCommand(getRemoved()); return undoCommand.execute(context); } | DeleteNodeCommand extends DeregisterNodeCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final AddNodeCommand undoCommand = new AddNodeCommand(getRemoved()); return undoCommand.execute(context); } } | DeleteNodeCommand extends DeregisterNodeCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final AddNodeCommand undoCommand = new AddNodeCommand(getRemoved()); return undoCommand.execute(context); } DeleteNodeCommand(final @MapsTo("uuid") String uuid); DeleteNode... | DeleteNodeCommand extends DeregisterNodeCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final AddNodeCommand undoCommand = new AddNodeCommand(getRemoved()); return undoCommand.execute(context); } DeleteNodeCommand(final @MapsTo("uuid") String uuid); DeleteNode... | DeleteNodeCommand extends DeregisterNodeCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { final AddNodeCommand undoCommand = new AddNodeCommand(getRemoved()); return undoCommand.execute(context); } DeleteNodeCommand(final @MapsTo("uuid") String uuid); DeleteNode... |
@Test public void initialize() throws Exception { cloneConnectorCommand.initialize(graphCommandExecutionContext); AddConnectorCommand addConnectorCommand = getExecutedCommand(command -> command instanceof AddConnectorCommand); assertEquals(addConnectorCommand.getEdge(), cloneEdge); assertEquals(addConnectorCommand.getS... | @Override @SuppressWarnings("unchecked") protected CloneConnectorCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); this.targetNode = (Node<? extends View<?>, Edge>) getNode(context, targetNodeUU... | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected CloneConnectorCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); this.targetNode =... | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected CloneConnectorCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); this.targetNode =... | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected CloneConnectorCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); this.targetNode =... | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected CloneConnectorCommand initialize(final GraphCommandExecutionContext context) { super.initialize(context); this.sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); this.targetNode =... |
@Test public void undo() throws Exception { cloneConnectorCommand.execute(graphCommandExecutionContext); cloneConnectorCommand.undo(graphCommandExecutionContext); verify(graphIndex, times(1)).removeEdge(cloneEdge); } | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } } | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } CloneConnectorCommand(); CloneConnectorCommand(final @MapsTo("candid... | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } CloneConnectorCommand(); CloneConnectorCommand(final @MapsTo("candid... | CloneConnectorCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { return new DeleteConnectorCommand(clone).execute(context); } CloneConnectorCommand(); CloneConnectorCommand(final @MapsTo("candid... |
@Test(expected = BadCommandArgumentsException.class) public void testAllowNodeNotFound() { this.tested = new UpdateElementPositionCommand(UUID, LOCATION, PREVIOUS_LOCATION); when(graphIndex.getNode(eq(UUID))).thenReturn(null); tested.allow(graphCommandExecutionContext); } | public Node<?, Edge> getNode() { return node; } | UpdateElementPositionCommand extends AbstractGraphCommand { public Node<?, Edge> getNode() { return node; } } | UpdateElementPositionCommand extends AbstractGraphCommand { public Node<?, Edge> getNode() { return node; } UpdateElementPositionCommand(final @MapsTo("uuid") String uuid,
final @MapsTo("location") Point2D location,
final @MapsTo("previousL... | UpdateElementPositionCommand extends AbstractGraphCommand { public Node<?, Edge> getNode() { return node; } UpdateElementPositionCommand(final @MapsTo("uuid") String uuid,
final @MapsTo("location") Point2D location,
final @MapsTo("previousL... | UpdateElementPositionCommand extends AbstractGraphCommand { public Node<?, Edge> getNode() { return node; } UpdateElementPositionCommand(final @MapsTo("uuid") String uuid,
final @MapsTo("location") Point2D location,
final @MapsTo("previousL... |
@Test public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<Bounds> bounds = ArgumentCaptor.forClass(Bounds.class); verify(content, times(1)).setBounds(bounds.capture()); assertEquals(CommandResult.Type.INFO, result.getType()); Bounds b = bounds.g... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } } | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } UpdateElementPositionCommand(final @MapsTo("uuid") Stri... | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } UpdateElementPositionCommand(final @MapsTo("uuid") Stri... | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } UpdateElementPositionCommand(final @MapsTo("uuid") Stri... |
@Test @SuppressWarnings("unchecked") public void testExecuteDockedNode() { ArgumentCaptor<Bounds> boundsArgumentCaptor = ArgumentCaptor.forClass(Bounds.class); this.tested = new UpdateElementPositionCommand(dockedNode, new Point2D(600d, 600d)); final CommandResult<RuleViolation> result = tested.execute(graphCommandExec... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } } | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } UpdateElementPositionCommand(final @MapsTo("uuid") Stri... | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } UpdateElementPositionCommand(final @MapsTo("uuid") Stri... | UpdateElementPositionCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { return execute(context, bounds -> node.getContent().setBounds(bounds)); } UpdateElementPositionCommand(final @MapsTo("uuid") Stri... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertTrue(parentInEdges.isEmpty()); assertTrue(candidateOutEdges.isEmpty()); verify(graphIndex, times(1)).removeE... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); final Node<?, Edge> candidate = getCandidate(contex... | RemoveParentCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); ... | RemoveParentCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); ... | RemoveParentCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); ... | RemoveParentCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Node<?, Edge> parent = getParent(context); ... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); assertFalse(parent.getOutEdges().isEmpty()); assertFalse(candidate.getInEdges().isEmpty()); Edge edge = (Edge) par... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(context).forEach(node -> execute(context, getParent(con... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... |
@Test @SuppressWarnings("unchecked") public void testExecuteCheckFailed() { final RuleViolations FAILED_VIOLATIONS = new DefaultRuleViolations() .addViolation(new ContainmentRuleViolation(graph.getUUID(), PARENT_UUID)); when(ruleManager.evaluate(any(RuleSet.class), any(RuleEvaluationContext.class))).thenReturn(FAILED_V... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(context).forEach(node -> execute(context, getParent(con... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... | SetChildrenCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { getCandidates(conte... |
@Test public void testDelegateGetSelectedCellsOrigin() { uiModel.getSelectedCellsOrigin(); verify(delegate).getSelectedCellsOrigin(); } | @Override public SelectedCell getSelectedCellsOrigin() { return delegate.getSelectedCellsOrigin(); } | DelegatingGridData implements GridData { @Override public SelectedCell getSelectedCellsOrigin() { return delegate.getSelectedCellsOrigin(); } } | DelegatingGridData implements GridData { @Override public SelectedCell getSelectedCellsOrigin() { return delegate.getSelectedCellsOrigin(); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public SelectedCell getSelectedCellsOrigin() { return delegate.getSelectedCellsOrigin(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,... | DelegatingGridData implements GridData { @Override public SelectedCell getSelectedCellsOrigin() { return delegate.getSelectedCellsOrigin(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int index,... |
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); ArgumentCaptor<Bounds> bounds = ArgumentCaptor.forClass(Bounds.class); assertEquals(CommandResult.Type.INFO, result.getType()); assertEquals(PROPERTY_OLD_VALUE, tested.get... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDefinitionManager().adapters().forDefinition().getProperty(element.g... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... |
@Test(expected = BadCommandArgumentsException.class) public void testExecuteNodeNotFound() { when(graphIndex.get(eq(UUID))).thenReturn(null); tested.execute(graphCommandExecutionContext); } | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDefinitionManager().adapters().forDefinition().getProperty(element.g... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... | UpdateElementPropertyValueCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final Element<Definition<?>> element = (Element<Definition<?>>) getNullSafeElement(context); final Object p = context.getDef... |
@Test public void testCheck() { tested = new UpdateControlPointPositionCommand(EDGE_UUID, newControlPoints); CommandResult<RuleViolation> result = tested.check(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... |
@Test(expected = IllegalArgumentException.class) public void testCannotUpdateCPs() { newControlPoints = new ControlPoint[]{newControlPoint1, newControlPoint2}; tested = new UpdateControlPointPositionCommand(EDGE_UUID, newControlPoints); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... |
@Test(expected = IllegalArgumentException.class) public void testCannotUpdateCPs2() { when(viewConnector.getControlPoints()).thenReturn(new ControlPoint[]{controlPoint1, controlPoint2}); tested = new UpdateControlPointPositionCommand(EDGE_UUID, newControlPoints); tested.check(graphCommandExecutionContext); } | @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControl... |
@Test public void testUpdateControlPoints() { tested = new UpdateControlPointPositionCommand(EDGE_UUID, newControlPoints); CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); ArgumentCaptor<ControlPoint[]> pointsCaptor = ArgumentCaptor.forClass(... | @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final HasControlPoints hasControlPoints = getEdgeControlPoints(context); oldControlPoints = hasControlPoints.getControlPoints(); hasControlPoints.setControlPoints(controlPoints); return SUCCESS; } | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final HasControlPoints hasControlPoints = getEdgeControlPoints(context); oldControlPoints = hasControlPoints.getControlPoints(); hasControlPoints.se... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final HasControlPoints hasControlPoints = getEdgeControlPoints(context); oldControlPoints = hasControlPoints.getControlPoints(); hasControlPoints.se... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final HasControlPoints hasControlPoints = getEdgeControlPoints(context); oldControlPoints = hasControlPoints.getControlPoints(); hasControlPoints.se... | UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final HasControlPoints hasControlPoints = getEdgeControlPoints(context); oldControlPoints = hasControlPoints.getControlPoints(); hasControlPoints.se... |
@Test public void testExecute() { CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); verify(graph, times(1)).clear(); verify(graphIndex, times(1)).clear(); } | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Graph<?, Node> graph = getGraph(context); if (hasRootUUID()) { ... | ClearGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Graph<?, Node>... | ClearGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Graph<?, Node>... | ClearGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Graph<?, Node>... | ClearGraphCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Graph<?, Node>... |
@Test(expected = UnsupportedOperationException.class) public void testUndo() { tested.undo(graphCommandExecutionContext); } | @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { throw new UnsupportedOperationException("Undo operation for Clear Graph Command is still not supported. "); } | ClearGraphCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { throw new UnsupportedOperationException("Undo operation for Clear Graph Command is still not supported. "); } } | ClearGraphCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { throw new UnsupportedOperationException("Undo operation for Clear Graph Command is still not supported. "); } ClearGraphCommand(final @MapsTo("rootUUID") String rootUUID); } | ClearGraphCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { throw new UnsupportedOperationException("Undo operation for Clear Graph Command is still not supported. "); } ClearGraphCommand(final @MapsTo("rootUUID") String rootUUID); @O... | ClearGraphCommand extends AbstractGraphCommand { @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) { throw new UnsupportedOperationException("Undo operation for Clear Graph Command is still not supported. "); } ClearGraphCommand(final @MapsTo("rootUUID") String rootUUID); @O... |
@Test @SuppressWarnings("unchecked") public void testSkipRulesForSameSourceNodeAsBefore() { when(edge.getSourceNode()).thenReturn(node); CommandResult<RuleViolation> result = tested.allow(graphCommandExecutionContext); assertEquals(CommandResult.Type.INFO, result.getType()); verify(ruleManager, times(0)).evaluate(eq(ru... | @SuppressWarnings("unchecked") public Node<? extends View<?>, Edge> getSourceNode(final GraphCommandExecutionContext context) { if (null == sourceNode) { sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); } return sourceNode; } | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") public Node<? extends View<?>, Edge> getSourceNode(final GraphCommandExecutionContext context) { if (null == sourceNode) { sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); } return sourceNode; } } | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") public Node<? extends View<?>, Edge> getSourceNode(final GraphCommandExecutionContext context) { if (null == sourceNode) { sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); } return sourceNode; } @S... | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") public Node<? extends View<?>, Edge> getSourceNode(final GraphCommandExecutionContext context) { if (null == sourceNode) { sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); } return sourceNode; } @S... | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @SuppressWarnings("unchecked") public Node<? extends View<?>, Edge> getSourceNode(final GraphCommandExecutionContext context) { if (null == sourceNode) { sourceNode = (Node<? extends View<?>, Edge>) getNode(context, sourceNodeUUID); } return sourceNode; } @S... |
@Test @SuppressWarnings("unchecked") public void testExecute() { final List lastSourceOutEdges = spy(new ArrayList()); final List sourceOutEdges = spy(new ArrayList()); final List targetInEdges = spy(new ArrayList()); when(node.getOutEdges()).thenReturn(sourceOutEdges); when(lastSourceNode.getOutEdges()).thenReturn(las... | @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final Edge<? extends View, Node> edge = getEdge(context); final Node<... | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final E... | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final E... | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final E... | SetConnectionSourceNodeCommand extends AbstractGraphCommand { @Override @SuppressWarnings("unchecked") public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) { final CommandResult<RuleViolation> results = allow(context); if (!results.getType().equals(CommandResult.Type.ERROR)) { final E... |
@Test public void testDelegateGetSelectedHeaderCells() { uiModel.getSelectedHeaderCells(); verify(delegate).getSelectedHeaderCells(); } | @Override public List<SelectedCell> getSelectedHeaderCells() { return delegate.getSelectedHeaderCells(); } | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedHeaderCells() { return delegate.getSelectedHeaderCells(); } } | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedHeaderCells() { return delegate.getSelectedHeaderCells(); } DelegatingGridData(final DMNGridData delegate); } | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedHeaderCells() { return delegate.getSelectedHeaderCells(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int ... | DelegatingGridData implements GridData { @Override public List<SelectedCell> getSelectedHeaderCells() { return delegate.getSelectedHeaderCells(); } DelegatingGridData(final DMNGridData delegate); @Override void moveRowTo(final int index,
final GridRow row); @Override void moveRowsTo(final int ... |
@Test public void testInitialize() throws Exception { cloneNodeCommand.initialize(graphCommandExecutionContext); Node<View, Edge> clone = cloneNodeCommand.getClone(); assertEquals(clone, this.clone); RegisterNodeCommand registerNodeCommand = (RegisterNodeCommand) cloneNodeCommand.getCommands().stream().filter(command -... | @Override @SuppressWarnings("unchecked") protected AbstractCompositeCommand<GraphCommandExecutionContext, RuleViolation> initialize(GraphCommandExecutionContext context) { Optional<String> parentUUID = getParentUUID(); if (!parentUUID.isPresent()) { throw new IllegalStateException("Parent not found for node " + candida... | CloneNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected AbstractCompositeCommand<GraphCommandExecutionContext, RuleViolation> initialize(GraphCommandExecutionContext context) { Optional<String> parentUUID = getParentUUID(); if (!parentUUID.isPresent()) { throw new Ill... | CloneNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected AbstractCompositeCommand<GraphCommandExecutionContext, RuleViolation> initialize(GraphCommandExecutionContext context) { Optional<String> parentUUID = getParentUUID(); if (!parentUUID.isPresent()) { throw new Ill... | CloneNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected AbstractCompositeCommand<GraphCommandExecutionContext, RuleViolation> initialize(GraphCommandExecutionContext context) { Optional<String> parentUUID = getParentUUID(); if (!parentUUID.isPresent()) { throw new Ill... | CloneNodeCommand extends AbstractGraphCompositeCommand { @Override @SuppressWarnings("unchecked") protected AbstractCompositeCommand<GraphCommandExecutionContext, RuleViolation> initialize(GraphCommandExecutionContext context) { Optional<String> parentUUID = getParentUUID(); if (!parentUUID.isPresent()) { throw new Ill... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.