@Test @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES) @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_REMOVE_EDGES, supported = false) @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES) public void shouldSupportRemoveEdgesIfEdgeCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex(); v.addEdge("friend", v); v.remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexFeatures.class.getSimpleName(), EdgeFeatures.FEATURE_REMOVE_EDGES)); } catch (Exception ex) { validateException(Edge.Exceptions.edgeRemovalNotSupported(), ex); } }
@Test @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES) @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_REMOVE_EDGES, supported = false) @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES) public void shouldSupportRemoveEdgesIfEdgeCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex(); v.addEdge("friend", v); v.remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexFeatures.class.getSimpleName(), EdgeFeatures.FEATURE_REMOVE_EDGES)); } catch (Exception ex) { validateException(Edge.Exceptions.edgeRemovalNotSupported(), ex); } }
@Override public void remove() { throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { throw edgeRemovalNotSupported(); }
@Override public void remove() { if (this.baseElement instanceof Vertex) throw Vertex.Exceptions.vertexRemovalNotSupported(); else throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { throw Edge.Exceptions.edgeRemovalNotSupported(); }
@Override public void remove() { if (this.baseElement instanceof Vertex) throw Vertex.Exceptions.vertexRemovalNotSupported(); else throw Edge.Exceptions.edgeRemovalNotSupported(); }