本文整理汇总了Java中org.apache.tinkerpop.gremlin.structure.Property.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Property.remove方法的具体用法?Java Property.remove怎么用?Java Property.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tinkerpop.gremlin.structure.Property
的用法示例。
在下文中一共展示了Property.remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: givenPropertyValueShouldAddItToEdge
import org.apache.tinkerpop.gremlin.structure.Property; //导入方法依赖的package包/类
@Test
public void givenPropertyValueShouldAddItToEdge() {
// arrange
Mockito.when(graph.tx()).thenAnswer(invocation -> transaction);
Mockito.when(relationship.get(Mockito.eq("id"))).thenAnswer(invocation -> Values.value(1L));
Mockito.when(relationship.type()).thenAnswer(invocation -> "label");
Mockito.when(relationship.keys()).thenAnswer(invocation -> Collections.singleton("key1"));
Mockito.when(relationship.get(Mockito.eq("key1"))).thenAnswer(invocation -> Values.value("value1"));
Mockito.when(provider.fieldName()).thenAnswer(invocation -> "id");
ArgumentCaptor<Long> argument = ArgumentCaptor.forClass(Long.class);
Mockito.when(provider.processIdentifier(argument.capture())).thenAnswer(invocation -> argument.getValue());
Neo4JEdge edge = new Neo4JEdge(graph, session, provider, outVertex, relationship, inVertex);
Property<?> result = edge.property("p1", 1L);
// act
result.remove();
// assert
Assert.assertFalse("Failed to remove property from edge", edge.property("p1").isPresent());
}
开发者ID:SteelBridgeLabs,项目名称:neo4j-gremlin-bolt,代码行数:19,代码来源:Neo4JEdgeWhileRemovingPropertyValueTest.java