LoneElementCollectionWrapper
org.scalatest.LoneElement.LoneElementCollectionWrapper
final class LoneElementCollectionWrapper[E, CTC[_]](collection: CTC[E], collecting: Collecting[E, CTC[E]], prettifier: Prettifier, pos: Position)
Wrapper class that adds a loneElement method to any collection type C for which an implicit Collecting[C] is available.
Through the implicit conversion provided by trait LoneElement, this class allows you to make statements like:
trav.loneElement should be > 9
Type parameters
- CTC
-
the "collection type constructor" for the collection on which to add the
loneElementmethod - E
-
the element type of the collection on which to add the
loneElementmethod
Value parameters
- collecting
-
a typeclass that enables the
loneElementsyntax - collection
-
a collection to wrap in a
LoneElementCollectionWrapper, which provides theloneElementmethod.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article