trait Sequencing[-S] extends AnyRef
Typeclass that enables for sequencing certain contain syntax in the ScalaTest matchers DSL.
An Sequencing[A] provides access to the "sequenching nature" of type A in such
a way that relevant contain matcher syntax can be used with type A. An A
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 the
Sequencing companion object:
scala.collection.GenSeqscala.collection.SortedSetscala.collection.SortedMapArrayjava.util.Listjava.util.SortedSetjava.util.SortedMapString
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 by Sequencing on your own
type U by defining an Sequencing[U] for the type and making it available implicitly.
- Source
- Sequencing.scala
- Alphabetic
- By Inheritance
- Sequencing
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def containsInOrder(sequence: S, eles: Seq[Any]): Boolean
Implements
containinOrdersyntax for sequences of typeS.Implements
containinOrdersyntax for sequences of typeS.- sequence
an sequence about which an assertion is being made
- eles
elements all of which should be contained, in order of appearance in
eles, in the passed sequence- returns
true if the passed sequence contains all of the passed elements in (iteration) order
- abstract def containsInOrderOnly(sequence: S, eles: Seq[Any]): Boolean
Implements
containinOrderOnlysyntax for sequences of typeS.Implements
containinOrderOnlysyntax for sequences of typeS.- sequence
an sequence about which an assertion is being made
- eles
the only elements that should be contained, in order of appearence in
eles, in the passed sequence- returns
true if the passed sequence contains only the passed elements in (iteration) order
- abstract def containsTheSameElementsInOrderAs(leftSequence: S, rightSequence: GenTraversable[Any]): Boolean
Implements
containtheSameElementsInOrderAssyntax for sequences of typeS.Implements
containtheSameElementsInOrderAssyntax for sequences of typeS.- leftSequence
an sequence about which an assertion is being made
- rightSequence
an sequence that should contain the same elements, in (iterated) order as the passed
leftSequence- returns
true if the passed
leftSequencecontains the same elements, in (iterated) order, as the passedrightSequence
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()