org.specs2.control

Members list

Type members

Classlikes

case class Action[A](runNow: ExecutionEnv => Future[A], last: Vector[Finalizer])

Asynchronous action with:

Asynchronous action with:

  • an optional list of "finalization" actions to be executed when this action is done whether it has timed-out or thrown an exception. This allows resources to be safely disposed of

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Action

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Action.type
case class ActionException(warnings: List[String], message: Option[String], throwable: Option[Throwable]) extends Exception

This exception class is used when an Action is transformed to a Task to avoid losing information

This exception class is used when an Action is transformed to a Task to avoid losing information

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class ConsoleLogger() extends Logger

Logger implementation directing messages to the console

Logger implementation directing messages to the console

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Logger
class Object
trait Matchable
class Any
Show all
trait Debug

This trait provides simple a way to print out any object to the console:

This trait provides simple a way to print out any object to the console:

"this string".pp must ===("this string")

will print 'this string' and pass it to the rest of the expectation

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Debug.type
trait NoDebug
object Debug extends Debug

Attributes

Companion
trait
Supertypes
trait Debug
class Object
trait Matchable
class Any
Self type
Debug.type

default filter for specs2 runs

default filter for specs2 runs

Attributes

Supertypes
trait Stacktraces
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
trait DontConvertTo[T]

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Exceptions

This trait provides methods to catch exceptions and transform them into values which can be passed to further computations.

This trait provides methods to catch exceptions and transform them into values which can be passed to further computations.

It uses the facilities found in the scala.util.control.Exception object while providing a more concise api on some use cases.

Attributes

See also

org.specs2.control.ExceptionsSpec for examples

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Exceptions.type
object Exceptions extends Exceptions

Attributes

Companion
trait
Supertypes
trait Exceptions
class Object
trait Matchable
class Any
Self type
Exceptions.type
object Executable

Execute external commands

Execute external commands

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Executable.type

This trait is used primarily to change the junit behavior depending on the execution environment

This trait is used primarily to change the junit behavior depending on the execution environment

Attributes

Companion
object
Supertypes
trait Stacktraces
class Object
trait Matchable
class Any
Known subtypes
object ExecutionOrigin.type

Attributes

Companion
trait
Supertypes
trait Stacktraces
class Object
trait Matchable
class Any
Self type
case class Finalizer(run: () => Unit)

Delayed action

Delayed action

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Finalizer

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Finalizer.type
trait Functions

This trait provides utility methods for functions

This trait provides utility methods for functions

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Functions.type
object Functions extends Functions

Attributes

Companion
trait
Supertypes
trait Functions
class Object
trait Matchable
class Any
Self type
Functions.type

This trait describes something which has a stackTrace with:

This trait describes something which has a stackTrace with:

  • a list of stacktrace element

This is used to provide a common interface to execute.Failure and execute.Error

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Error
class Failure
case class IncludeExcludeStackTraceFilter(include: Seq[String], exclude: Seq[String]) extends StackTraceFilter

Implementation of the StackTraceFilter trait with a list of include/exclude patterns

Implementation of the StackTraceFilter trait with a list of include/exclude patterns

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type

Factory object to build a stack trace filter from include/exclude expressions:

Factory object to build a stack trace filter from include/exclude expressions:

.*specs2 ==> include .*specs2 traces .specs2/scala. ==> include .specs2 traces, exclude scala. traces .*specs2,eclipse ==> include .*specs2,scala traces and eclipse traces

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class Lazy[+T](v: () => T)(using x$2: CanEqual[T, T])

class holding a value to be evaluated lazily

class holding a value to be evaluated lazily

Attributes

Supertypes
class Object
trait Matchable
class Any

These functions can be used to allow some function to be called with varargs, with values being evaluated lazily:

These functions can be used to allow some function to be called with varargs, with values being evaluated lazily:

 def method[T](values: Lazy[T]*) = {
   values.to(LazyList) // use the toStream method to consume the values lazily
 }
 // usage
 method(exp1, exp2, exp3)

Note that the values are really evaluated once, unlike a by-name parameter.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object LazyConversions.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class LazyValue[T](t: () => T)

This class simply encapsulates a lazy value which will be only evaluated once

This class simply encapsulates a lazy value which will be only evaluated once

Attributes

See also

org.specs2.specification.process.RandomSequentialExecutor for an example of use

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait Logger

specs2 logger support

specs2 logger support

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NoLogger.type
case class NamedThreadFactory(namePrefix: String, group: ThreadGroup, priority: Int) extends ThreadFactory

This factory creates named threads which can be prefixed by "specs2" to track the threads used by specs2 for the specification execution

This factory creates named threads which can be prefixed by "specs2" to track the threads used by specs2 for the specification execution

Contributed by @jedws

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait ThreadFactory
class Object
trait Matchable
class Any
Show all
trait NoDebug extends Debug

Use this trait to disable the pp method on objects

Use this trait to disable the pp method on objects

Attributes

Supertypes
trait Debug
class Object
trait Matchable
class Any
object NoLogger extends Logger

Attributes

Supertypes
trait Logger
class Object
trait Matchable
class Any
Self type
NoLogger.type

Attributes

Supertypes
class Object
trait Matchable
class Any

This filter doesn't do anything

This filter doesn't do anything

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Syntactic sugar to execute an action a given number of times

Syntactic sugar to execute an action a given number of times

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NumberOfTimes.type
object NumberOfTimes extends NumberOfTimes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class Operation[A](operation: () => Either[Throwable, A], last: Vector[Finalizer])

Synchronous action with:

Synchronous action with:

  • an optional list of "finalization" actions to be executed when this action is done if it throws an exception. This allows resources to be safely disposed of

It is essentially the same as an Action without the asynchronicity

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Operation

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Operation.type
trait Properties

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Properties.type
object Properties extends Properties

Attributes

Companion
trait
Supertypes
trait Properties
class Object
trait Matchable
class Any
Self type
Properties.type
case class Property[T](value: () => Option[T], evaluated: Boolean, evaluatedValue: Option[T])(using x$4: CanEqual[T, T])

This class represents values which are evaluated lazily and which may even be missing.

This class represents values which are evaluated lazily and which may even be missing.

It has Option-like function and can be also converted to an Either object

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Property

Companion object to create properties with possibly no initial value

Companion object to create properties with possibly no initial value

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Property.type
class Ref[T](var toOption: Option[T])

class holding an optional mutable value

class holding an optional mutable value

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Ref

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Ref.type
trait Safe[F[_]]

Typeclass for "safe" actions which are actions which can be attempted or finalized

Typeclass for "safe" actions which are actions which can be attempted or finalized

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object FinalizedAction.type
object SafeOperation.type
object Safe

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Safe.type

This trait filters an Exception stacktrace

This trait filters an Exception stacktrace

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait Stacktraces

Utility methods to determine the origin of the execution of the current code

Utility methods to determine the origin of the execution of the current code

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ExecutionOrigin.type
object Stacktraces.type
object Stacktraces extends Stacktraces

Attributes

Companion
trait
Supertypes
trait Stacktraces
class Object
trait Matchable
class Any
Self type
case class StringOutputLogger(output: StringOutput) extends Logger

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Logger
class Object
trait Matchable
class Any
Show all
object Throwables

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Throwables.type
trait Throwablex

This trait adds some utility methods to Throwable objects.

This trait adds some utility methods to Throwable objects.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Throwablex.type
object Throwablex extends Throwablex

Attributes

Companion
trait
Supertypes
trait Throwablex
class Object
trait Matchable
class Any
Self type
Throwablex.type
case class Times(n: Int)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class TraceLocation(path: String, fileName: String, className: String, methodName: String, lineNumber: Int)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TraceLocation

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class UserException(message: String, throwable: Throwable) extends Exception

This exception class is used to notify the user of instantiation errors

This exception class is used to notify the user of instantiation errors

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all