Search in sources :

Example 1 with VertexLabelMaker

use of com.thinkaurelius.titan.core.schema.VertexLabelMaker in project titan by thinkaurelius.

the class ManagementTest method testReservedNamesRejectedForVertexLabels.

@Test
public void testReservedNamesRejectedForVertexLabels() {
    for (String s : ILLEGAL_USER_DEFINED_NAMES) {
        TitanManagement tm = graph.openManagement();
        VertexLabelMaker vlm = null;
        try {
            vlm = tm.makeVertexLabel(s);
            Assert.fail("Vertex label \"" + s + "\" must be rejected");
        } catch (IllegalArgumentException e) {
            log.debug("Caught expected exception", e);
        } finally {
            tm.commit();
        }
    }
}
Also used : VertexLabelMaker(com.thinkaurelius.titan.core.schema.VertexLabelMaker) TitanManagement(com.thinkaurelius.titan.core.schema.TitanManagement) Test(org.junit.Test) TitanGraphBaseTest(com.thinkaurelius.titan.graphdb.TitanGraphBaseTest)

Aggregations

TitanManagement (com.thinkaurelius.titan.core.schema.TitanManagement)1 VertexLabelMaker (com.thinkaurelius.titan.core.schema.VertexLabelMaker)1 TitanGraphBaseTest (com.thinkaurelius.titan.graphdb.TitanGraphBaseTest)1 Test (org.junit.Test)1