All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.sqlg.test.edges.TestOutE Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package org.umlg.sqlg.test.edges;

import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Assert;
import org.junit.Test;
import org.umlg.sqlg.test.BaseTest;

/**
 * Date: 2015/02/23
 * Time: 11:37 AM
 */
public class TestOutE extends BaseTest {

    @Test
    public void testOutEWithLabels() {
        Vertex v1 = this.sqlgGraph.addVertex(T.label, "Person", "name", "p");
        Vertex v2 = this.sqlgGraph.addVertex(T.label, "Person");
        Vertex v3 = this.sqlgGraph.addVertex(T.label, "Person");
        v1.addEdge("aaa", v2);
        v1.addEdge("bbb", v3);
        this.sqlgGraph.tx().commit();
        Assert.assertEquals(1, vertexTraversal(this.sqlgGraph, v1).outE("aaa").count().next().intValue());
        Assert.assertEquals(1, this.sqlgGraph.traversal().V().has("name", "p").outE("aaa").count().next().intValue());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy