org.umlg.sqlg.test.gremlincompile.TestAlias Maven / Gradle / Ivy
package org.umlg.sqlg.test.gremlincompile;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
import org.umlg.sqlg.test.BaseTest;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* Date: 2015/12/14
* Time: 10:15 PM
*/
public class TestAlias extends BaseTest {
@Test
public void testFieldWithDots() {
this.sqlgGraph.addVertex(T.label, "Person", "test.1", "a");
this.sqlgGraph.tx().commit();
List vertices = this.sqlgGraph.traversal().V().hasLabel("Person").toList();
assertEquals(1, vertices.size());
assertEquals("a", vertices.get(0).value("test.1"));
assertTrue(vertices.get(0).property("test.1").isPresent());
}
// @Test
public void testAlias() {
Vertex a1 = this.sqlgGraph.addVertex(T.label, "A", "name", "a1");
Vertex b1 = this.sqlgGraph.addVertex(T.label, "B", "name", "b1");
a1.addEdge("ab", b1);
this.sqlgGraph.tx().commit();
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy