Trait/Object

org.scalatest.enablers

Existence

Related Docs: object Existence | package enablers

Permalink

trait Existence[-S] extends AnyRef

Supertrait for typeclasses that enable the exist matcher syntax.

An Existence[S] provides access to the "existence nature" of type S in such a way that exist matcher syntax can be used with type S. A S can be any type for which the concept of existence makes sense, such as java.io.File. ScalaTest provides implicit implementations for java.io.File. You can enable the exist matcher syntax on your own type U by defining a Existence[U] for the type and making it available implicitly.

ScalaTest provides an implicit Existence instance for java.io.File in the Existence companion object.

Source
Existence.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Existence
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def exists(thing: S): Boolean

    Permalink

    Determines whether the passed thing exists, i.e., whether the passed java.io.File exists.

    Determines whether the passed thing exists, i.e., whether the passed java.io.File exists.

    thing

    the thing to check for existence

    returns

    true if passed thing exists, false otherwise