Skip to content

Commit

Permalink
add tests for all new steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier committed Mar 24, 2018
1 parent 6f39704 commit d04d82a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions gremlin-scala/src/test/scala/gremlin/scala/TraversalSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,21 @@ class TraversalSpec extends WordSpec with Matchers {
}
}

"add edges".which {
"add elements".which {
val v1Label = StepLabel[Vertex]("v1")
val CoDeveloper = "co-developer"

"don't use special steps" in new Fixture {
"show simple case" in new Fixture {
val g = graph.traversal
val michael = g.addV(Person).property(Name -> "michael").head
val karlotta = g.addV(Person).property(Name -> "karlotta").head

g.V(michael).addE("loves").to(karlotta).head
g.addE("knows").from(michael).to(karlotta).head
michael.start.outE.count.head shouldBe 2
}

"use multiple traversals" in new Fixture {
val traversal = for {
v1 <- graph.V(1)
coDeveloper <- v1.out(Created).in(Created).filter(_.is(P.neq(v1)))
Expand Down

0 comments on commit d04d82a

Please sign in to comment.