You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, CollectionDslContext needs to be extended with map, flatMap, filter etc. to support syntax such as:
caseclassElement(value: Int)
caseclassContainer(elements: Seq[Element])
valcontainerValidator=Validator[Container] { c =>// First element's value must be 0
c.elements.headOption.each map { _.value } should be ==0
}
For future consideration:
c.elements.headOption.each is validWith { _.value should be == 0 }
c.elements startsWith { _.value should be == 0 }
c.elements.head is validWith { ... } -- unlikely as would require heuristic wrapping of collection access
The text was updated successfully, but these errors were encountered:
Basically,
CollectionDslContext
needs to be extended withmap
,flatMap
,filter
etc. to support syntax such as:For future consideration:
c.elements.headOption.each is validWith { _.value should be == 0 }
c.elements startsWith { _.value should be == 0 }
c.elements.head is validWith { ... }
-- unlikely as would require heuristic wrapping of collection accessThe text was updated successfully, but these errors were encountered: