File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
traversal/src/test/scala/overflowdb/traversal Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ class RepeatTraversalTests extends AnyWordSpec {
113113 centerTrav.repeat(_.out)(_.until(_.hasLabel(Thing .Label ))).property(Name ).toSetMutable shouldBe expectedResults
114114 centerTrav.repeat(_.out)(_.until(_.hasLabel(Thing .Label )).breadthFirstSearch).property(Name ).toSetMutable shouldBe expectedResults
115115 }
116+
117+ " be combinable with `.times`" in {
118+ centerTrav.repeat(_.followedBy)(_.until(_.name(" R2" )).times(3 )).name.toSetMutable shouldBe Set (" L3" , " R2" )
119+ }
120+
116121 }
117122
118123 " support repeat/while behaviour" should {
@@ -149,6 +154,10 @@ class RepeatTraversalTests extends AnyWordSpec {
149154 Seq (center, l1),
150155 )
151156 }
157+
158+ " be combinable with `.times`" in {
159+ centerTrav.repeat(_.followedBy)(_.whilst(_.nameNot(" R2" )).times(3 )).name.toSetMutable shouldBe Set (" L3" , " R2" )
160+ }
152161 }
153162
154163 " .dedup should apply to all repeat iterations" when {
You can’t perform that action at this time.
0 commit comments