Implements contain
inOrder
syntax for sequences of type S
.
Implements contain
inOrder
syntax for sequences of type S
.
an sequence about which an assertion is being made
elements all of which should be contained, in order of appearance in eles
, in the passed sequence
true if the passed sequence contains all of the passed elements in (iteration) order
Implements contain
inOrderOnly
syntax for sequences of type S
.
Implements contain
inOrderOnly
syntax for sequences of type S
.
an sequence about which an assertion is being made
the only elements that should be contained, in order of appearence in eles
, in the passed sequence
true if the passed sequence contains only the passed elements in (iteration) order
Implements contain
theSameElementsInOrderAs
syntax for sequences of type S
.
Implements contain
theSameElementsInOrderAs
syntax for sequences of type S
.
an sequence about which an assertion is being made
an sequence that should contain the same elements, in (iterated) order as the passed leftSequence
true if the passed leftSequence
contains the same elements, in (iterated) order, as the passed rightSequence
Typeclass that enables for sequencing certain
contain
syntax in the ScalaTest matchers DSL.An
Sequencing[A]
provides access to the "sequenching nature" of typeA
in such a way that relevantcontain
matcher syntax can be used with typeA
. AnA
can be any type of sequencing—an object that in some way brings together other objects in order. ScalaTest provides implicit implementations for several types out of the box in theSequencing
companion object:scala.collection.GenSeq
scala.collection.SortedSet
scala.collection.SortedMap
Array
java.util.List
java.util.SortedSet
java.util.SortedMap
String
The
contain
syntax enabled by this trait is:result should contain inOrder (1, 2, 3)
result should contain inOrderOnly (1, 2, 3)
result should contain theSameElementsInOrderAs List(1, 2, 3)
You can enable the
contain
matcher syntax enabled bySequencing
on your own typeU
by defining anSequencing[U]
for the type and making it available implicitly.