@Test @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_REMOVE_PROPERTY, supported = false) @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY) public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex("name", "me"); v.property("name").remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexFeatures.class.getSimpleName(), VertexFeatures.FEATURE_REMOVE_PROPERTY)); } catch (Exception e) { validateException(Property.Exceptions.propertyRemovalNotSupported(), e); } } }
@Test @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = EdgeFeatures.FEATURE_REMOVE_PROPERTY, supported = false) @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE) public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex(); final Edge e = v.addEdge("self", v, "name", "foo"); e.property("name").remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, EdgeFeatures.class.getSimpleName(), EdgeFeatures.FEATURE_REMOVE_PROPERTY)); } catch (Exception ex) { validateException(Property.Exceptions.propertyRemovalNotSupported(), ex); } } }
@Test @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = VertexPropertyFeatures.FEATURE_REMOVE_PROPERTY, supported = false) @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES) @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY) public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex(); final VertexProperty p = v.property(VertexProperty.Cardinality.single, "name", "me", "test", "this"); p.property("test").remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexPropertyFeatures.class.getSimpleName(), VertexPropertyFeatures.FEATURE_REMOVE_PROPERTY)); } catch (Exception ex) { validateException(Property.Exceptions.propertyRemovalNotSupported(), ex); } }
@Test @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = VertexPropertyFeatures.FEATURE_REMOVE_PROPERTY, supported = false) @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES) @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY) public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex(); final VertexProperty p = v.property(VertexProperty.Cardinality.single, "name", "me", "test", "this"); p.property("test").remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexPropertyFeatures.class.getSimpleName(), VertexPropertyFeatures.FEATURE_REMOVE_PROPERTY)); } catch (Exception ex) { validateException(Property.Exceptions.propertyRemovalNotSupported(), ex); } }
@Test @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = EdgeFeatures.FEATURE_REMOVE_PROPERTY, supported = false) @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE) public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex(); final Edge e = v.addEdge("self", v, "name", "foo"); e.property("name").remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, EdgeFeatures.class.getSimpleName(), EdgeFeatures.FEATURE_REMOVE_PROPERTY)); } catch (Exception ex) { validateException(Property.Exceptions.propertyRemovalNotSupported(), ex); } } }
@Override public void remove() { throw propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Test @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_REMOVE_PROPERTY, supported = false) @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY) public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() throws Exception { try { final Vertex v = graph.addVertex("name", "me"); v.property("name").remove(); fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexFeatures.class.getSimpleName(), VertexFeatures.FEATURE_REMOVE_PROPERTY)); } catch (Exception e) { validateException(Property.Exceptions.propertyRemovalNotSupported(), e); } } }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); } }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); }
@Override public void remove() { throw Property.Exceptions.propertyRemovalNotSupported(); } }