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

org.umlg.sqlg.test.topology.TestTopologyGraph Maven / Gradle / Ivy

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

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

import java.io.IOException;
import java.util.List;
import java.util.Properties;

/**
 * @author Pieter Martin (https://github.com/pietermartin)
 * Date: 2017/11/16
 */
public class TestTopologyGraph extends BaseTest {

    @Test
    public void testTopologyGraphVersion() {
        List vertices = this.sqlgGraph.topology().V()
                .hasLabel(Topology.SQLG_SCHEMA + "." + Topology.SQLG_SCHEMA_GRAPH)
                .toList();
        Assert.assertEquals(1, vertices.size());
        Vertex vertex = vertices.get(0);
        String versionTmp = "";
        Properties prop = new Properties();
        try {
            prop.load(ClassLoader.getSystemResource("sqlg.application.properties").openStream());
            versionTmp = (String) prop.get("application.version");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        Assert.assertEquals(versionTmp, vertex.value("version"));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy