use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class GatherStepTest method test_g_v1_out_gather.
public void test_g_v1_out_gather(final Pipe<Vertex, List<Vertex>> pipe) {
super.test_g_v1_out_gather(new GremlinPipeline(g.getVertex(1)).out().gather());
super.test_g_v1_out_gather(new GremlinPipeline(g.getVertex(1)).optimize(false).out().gather());
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class GatherStepTest method test_g_v1_out_gatherXget0X.
public void test_g_v1_out_gatherXget0X(final Pipe<Vertex, Vertex> pipe) {
super.test_g_v1_out_gatherXget0X(new GremlinPipeline(g.getVertex(1)).out().gather(new PipeFunction<List, Vertex>() {
public Vertex compute(List argument) {
return (Vertex) argument.get(0);
}
}));
super.test_g_v1_out_gatherXget0X(new GremlinPipeline(g.getVertex(1)).optimize(false).out().gather(new PipeFunction<List, Vertex>() {
public Vertex compute(List argument) {
return (Vertex) argument.get(0);
}
}));
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class MapStepTest method test_g_v1_mapXname_idX.
public void test_g_v1_mapXname_idX() {
super.test_g_v1_mapXname_idX(new GremlinPipeline(g.getVertex(1)).map("name", "id"));
super.test_g_v1_mapXname_idX(new GremlinPipeline(g.getVertex(1)).optimize(false).map("name", "id"));
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class IfThenElseStepTest method test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name.
public void test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name() {
super.test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name(new GremlinPipeline(g.getVertex(1)).out().ifThenElse(new PipeFunction<Vertex, Boolean>() {
public Boolean compute(Vertex vertex) {
return vertex.getProperty("lang") != null && vertex.getProperty("lang").equals("java");
}
}, new PipeFunction<Vertex, Vertex>() {
public Vertex compute(Vertex vertex) {
return vertex;
}
}, new PipeFunction<Vertex, Iterable<Vertex>>() {
public Iterable<Vertex> compute(Vertex vertex) {
return new GremlinPipeline(vertex).out();
}
}));
super.test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name(new GremlinPipeline(g.getVertex(1)).optimize(false).out().ifThenElse(new PipeFunction<Vertex, Boolean>() {
public Boolean compute(Vertex vertex) {
return vertex.getProperty("lang") != null && vertex.getProperty("lang").equals("java");
}
}, new PipeFunction<Vertex, Vertex>() {
public Vertex compute(Vertex vertex) {
return vertex;
}
}, new PipeFunction<Vertex, Iterable<Vertex>>() {
public Iterable<Vertex> compute(Vertex vertex) {
return new GremlinPipeline(vertex).out();
}
}));
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class SplitMergeStepsTest method test_g_v1_out_copySplitXpropertyXnameX__propertyXageXX_fairMerge.
public void test_g_v1_out_copySplitXpropertyXnameX__propertyXageXX_fairMerge() {
super.test_g_v1_out_copySplitXpropertyXnameX__propertyXageXX_fairMerge(new GremlinPipeline(g.getVertex(1)).out().copySplit(new GremlinPipeline().property("name"), new GremlinPipeline().property("age")).fairMerge());
super.test_g_v1_out_copySplitXpropertyXnameX__propertyXageXX_fairMerge(new GremlinPipeline(g.getVertex(1)).optimize(false).out().copySplit(new GremlinPipeline().optimize(false).property("name"), new GremlinPipeline().property("age")).fairMerge());
}
Aggregations