Search in sources :

Example 41 with GraphNode

use of com.datastax.dse.driver.api.core.graph.GraphNode in project java-driver by datastax.

the class GraphNodeTest method should_check_if_node_is_vertex_property.

@Test
@UseDataProvider("allGraphProtocols")
public void should_check_if_node_is_vertex_property(GraphProtocol graphProtocol) throws IOException {
    // when
    GraphNode vertexPropertyNode = serdeAndCreateGraphNode(new DetachedVertexProperty<>("id", "l", "v", null, new DetachedVertex("a", "l", null)), graphProtocol);
    // then
    assertThat(vertexPropertyNode.isVertexProperty()).isTrue();
    assertThat(vertexPropertyNode.isVertexProperty()).isNotNull();
}
Also used : DetachedVertex(org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex) GraphNode(com.datastax.dse.driver.api.core.graph.GraphNode) Test(org.junit.Test) UseDataProvider(com.tngtech.java.junit.dataprovider.UseDataProvider)

Aggregations

GraphNode (com.datastax.dse.driver.api.core.graph.GraphNode)41 Test (org.junit.Test)34 AsyncGraphResultSet (com.datastax.dse.driver.api.core.graph.AsyncGraphResultSet)19 GraphResultSet (com.datastax.dse.driver.api.core.graph.GraphResultSet)17 UseDataProvider (com.tngtech.java.junit.dataprovider.UseDataProvider)13 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)6 Path (org.apache.tinkerpop.gremlin.process.traversal.Path)4 FluentGraphStatement (com.datastax.dse.driver.api.core.graph.FluentGraphStatement)3 GraphStatement (com.datastax.dse.driver.api.core.graph.GraphStatement)3 ScriptGraphStatement (com.datastax.dse.driver.api.core.graph.ScriptGraphStatement)3 SocialTraversalSource (com.datastax.dse.driver.api.core.graph.SocialTraversalSource)3 GraphTestUtils.createGraphBinaryModule (com.datastax.dse.driver.internal.core.graph.GraphTestUtils.createGraphBinaryModule)3 GraphBinaryModule (com.datastax.dse.driver.internal.core.graph.binary.GraphBinaryModule)3 DriverExecutionProfile (com.datastax.oss.driver.api.core.config.DriverExecutionProfile)3 ExecutionInfo (com.datastax.oss.driver.api.core.cql.ExecutionInfo)3 PoolBehavior (com.datastax.oss.driver.internal.core.cql.PoolBehavior)3 ByteBuffer (java.nio.ByteBuffer)3 DetachedVertex (org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex)3 ArrayDeque (java.util.ArrayDeque)2 Map (java.util.Map)2