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

org.umlg.sqlg.test.gremlincompile.TestAlias Maven / Gradle / Ivy

There is a newer version: 3.1.1
Show newest version
package org.umlg.sqlg.test.gremlincompile;

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;

import java.util.List;

/**
 * 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();
        Assert.assertEquals(1, vertices.size());
        Assert.assertEquals("a", vertices.get(0).value("test.1"));
        Assert.assertTrue(vertices.get(0).property("test.1").isPresent());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy