Package

org.specs2

execute

Permalink

package execute

Visibility
  1. Public
  2. All

Type Members

  1. class AnyValueAsResult[T] extends AsResult[T]

    Permalink

    Type class to transform any value to a Result

  2. trait AsResult[T] extends AnyRef

    Permalink

    Typeclass trait for anything that can be transformed to a Result

  3. case class DecoratedResult[+T](decorator: T, result: Result) extends Result with Product with Serializable

    Permalink

    This result allows to embed additional data with a given result for further display

    This result allows to embed additional data with a given result for further display

    Is is used to provide a way to display properly the data tables in the HtmlExporter

  4. case class DecoratedResultException(result: DecoratedResult[_]) extends Exception with ExecuteException with Product with Serializable

    Permalink

    this class allows to throw a result that's decorated with additional information in an Exception

  5. sealed trait Details extends AnyRef

    Permalink

    Trait to model detailed information for failures so that smart differences can be computed

  6. case class Error(m: String, t: Throwable) extends Result with ResultStackTrace with Product with Serializable

    Permalink

    This class represents an exception occurring during an execution.

  7. case class ErrorException(f: Error) extends Exception with ExecuteException with Product with Serializable

    Permalink

    this class allows to throw an Error result in an Exception

  8. trait EventuallyResults extends AnyRef

    Permalink

    This trait adds the possibility to retry a given value, convertible to a result, until it succeeds.

    This trait adds the possibility to retry a given value, convertible to a result, until it succeeds.

    This was adapted from a contribution by @robey (http://robey.lag.net)

  9. trait Executable extends AnyRef

    Permalink

    Trait for anything that can be executed to return a Result

  10. trait ExecuteException extends Exception

    Permalink
  11. case class Failure(m: String = "", e: String = "", stackTrace: List[StackTraceElement] = ..., details: Details = NoDetails) extends Result with ResultStackTrace with Product with Serializable

    Permalink

    This class represents the failure of an execution.

    This class represents the failure of an execution. It has a message and a stacktrace

  12. case class FailureDetails(actual: String, expected: String) extends Details with Product with Serializable

    Permalink
  13. case class FailureException(f: Failure) extends Exception with ExecuteException with Product with Serializable

    Permalink

    this class allows to throw a failure result in an Exception

  14. case class FailureMapDetails(actual: Map[Any, Any], expected: Map[Any, Any]) extends Details with Product with Serializable

    Permalink
  15. case class FailureSeqDetails(actual: Seq[Any], expected: Seq[Any]) extends Details with Product with Serializable

    Permalink
  16. case class FailureSetDetails(actual: Set[Any], expected: Set[Any]) extends Details with Product with Serializable

    Permalink
  17. class Function0Result extends AnyRef

    Permalink

    This class is used to delay the execution of a result

  18. trait Isolable extends AnyRef

    Permalink

    This trait models elements which can be executed in a brand new context with new local variables It is used to execute examples in a new specification when needed

  19. case class MyClass(list: List[_]) extends Product with Serializable

    Permalink
  20. trait NoPendingUntilFixed extends PendingUntilFixed

    Permalink

    use this trait to remove the pending until fixed implicit conversion

  21. case class ParseError(message: String) extends TypecheckResult with Product with Serializable

    Permalink
  22. case class Pending(m: String = "") extends Result with Product with Serializable

    Permalink

    Pending result

    Pending result

    See also

    Result for description

  23. case class PendingException(f: Pending) extends Exception with ExecuteException with Product with Serializable

    Permalink

    this class allows to throw a pending result in an Exception

  24. trait PendingUntilFixed extends AnyRef

    Permalink

    This function allows to mark the body of an example as pending until it is fixed.

    This function allows to mark the body of an example as pending until it is fixed.

    If the result becomes a success then it is reported as a Failure so that the user thinks of removing the marker

  25. sealed abstract class Result extends AnyRef

    Permalink

    The result of an execution, either:

    The result of an execution, either:

    • a success: the execution is ok
    • a failure: an expectation is not met
    • an error: an exception occurred
    • a pending execution: the user has decided that execution must not be performed
    • a skipped execution: based on dynamic conditions (a database not available for instance) the execution is not performed

    A Result has:

    • a message describing the outcome
    • a message describing the expectation
    • possibly a number of expectations when it is the outcome of several checks (this is used for the reporting of ScalaCheck properties).
  26. trait ResultExecution extends AnyRef

    Permalink

    This trait executes a Result and returns an appropriate value when a specs2 exception is thrown

  27. trait ResultImplicits extends AnyRef

    Permalink

    This trait adds some implicits to easily fold sequences of results

  28. trait ResultLike extends AnyRef

    Permalink

    This trait can be used for anything that can be converted to a Result.

    This trait can be used for anything that can be converted to a Result.

    It is used by the MatchResult class so it can be executed as any other kind of Result by the ResultExecution class without introducing a dependency between the execute and the matcher package

  29. trait ResultLogicalCombinators extends Results

    Permalink

    This trait provides logical combinators to Results: and, or, not

    This trait provides logical combinators to Results: and, or, not

    A Result expression can throw an exception which will be changed into a failure or an error before being used with and/or/not

  30. trait ResultStackTrace extends HasStackTrace

    Permalink

    The stacktrace for a Result

  31. trait Results extends AnyRef

    Permalink
  32. case class ScissorsCutter(cutMarker: String = scissorsMarker, cutMarkerFormat: String = scissorsMarkerFormat) extends (String) ⇒ String with Product with Serializable

    Permalink

    Implementation of a function to cut pieces of code by using some comments as markers

  33. case class SkipException(f: Skipped) extends Exception with ExecuteException with Product with Serializable

    Permalink

    this class allows to throw a skipped result in an Exception

  34. case class Skipped(m: String = "", e: String = "") extends Result with Product with Serializable

    Permalink

    Skipped result

    Skipped result

    See also

    Result for description

  35. case class Snippet[T](code: () ⇒ T, codeExpression: Option[String] = None, params: SnippetParams[T] = SnippetParams[T]()) extends Product with Serializable

    Permalink

    Captured snippet of code with: a value of type T, a string representing the expression, captured by a macro, some evaluation and display parameters

  36. case class SnippetParams[T](trimExpression: (String) ⇒ String = trimApproximatedSnippet, cutter: (String) ⇒ String = ScissorsCutter(), asCode: (String, String) ⇒ String = markdownCode(offset = 0), prompt: (String) ⇒ String = greaterThanPrompt, evalCode: Boolean = false, verify: Option[(T) ⇒ Result] = None) extends Product with Serializable

    Permalink

    Evaluation and display parameters for a Snippet.

    Evaluation and display parameters for a Snippet.

    It is possible to change:

    • the function that's trimming the expression from newlines or accolades
    • the cutter function to remove part which must not be shown
    • the asCode function to render the resulting text
    • the prompt function to possibly display the evaluated result with a prompt
    • the eval boolean indicating if a snippet must be evaluated
    • the verify function checking the result
  37. trait Snippets extends AnyRef

    Permalink

    Snippets of code can be extracted from interpolated specification strings.

    Snippets of code can be extracted from interpolated specification strings.

    When you want to specify that a piece of code must be included in the specification output, you can use the snippet method to execute a this code and use the text in the output. If you just want to output part of the code you need to delimit it with some comments // 8<------- (with as many dashes >= 2 as you want)

    Generally the value of a snippet will not be evaluated nor displayed but it is possible to show it using the eval method on a Snippet.

    It is also possible to check that the result value is correct by using the check method.

  38. trait StandardResults extends AnyRef

    Permalink

    This trait provides standard results which can be used in Fragments bodies

  39. case class Success(m: String = "", exp: String = "") extends Result with Product with Serializable

    Permalink

    This class represents the success of an execution

  40. case class TypecheckError(message: String) extends TypecheckResult with Product with Serializable

    Permalink
  41. case class TypecheckParams(_deferMacros: Option[Boolean] = None, _deferImplicits: Option[Boolean] = None, _deferParsing: Option[Boolean] = None) extends Product with Serializable

    Permalink
  42. sealed trait TypecheckResult extends AnyRef

    Permalink
  43. case class Typechecked(code: String, result: TypecheckResult) extends Product with Serializable

    Permalink

    result of the typechecking of some code

  44. case class UnexpectedTypecheckError(message: String) extends TypecheckResult with Product with Serializable

    Permalink

Value Members

  1. object AsResult

    Permalink
  2. object BestMatching

    Permalink

    Use of the Hopcroft-Karp (https://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm) algorithm for specs2, to the minimum set of mismatched elements, and corresponding failures

  3. object CanTypecheckLiteralsOnly extends TypecheckResult

    Permalink
  4. object Error extends Product with Serializable

    Permalink

    This object allows to create an Error from an exception

  5. object EventuallyResults extends EventuallyResults

    Permalink
  6. object FromExpectationError extends Details with Product with Serializable

    Permalink
  7. object FromJUnitAssertionError extends Details with Product with Serializable

    Permalink
  8. object FromNotImplementedError extends Details with Product with Serializable

    Permalink
  9. object Function0Result

    Permalink
  10. object NoDetails extends Details with Product with Serializable

    Permalink
  11. object PendingUntilFixed extends PendingUntilFixed

    Permalink
  12. object Result

    Permalink
  13. object ResultExecution extends ResultExecution

    Permalink
  14. object ResultImplicits extends ResultImplicits

    Permalink
  15. object ResultLogicalCombinators extends ResultLogicalCombinators

    Permalink
  16. object Results extends Results

    Permalink
  17. object Snippet extends Serializable

    Permalink
  18. object Snippets extends Snippets

    Permalink
  19. object StandardResults extends StandardResults

    Permalink
  20. object Success extends Serializable

    Permalink

    Companion object to the Success class providing a method to set the expectations number

  21. object Typecheck

    Permalink

    This macro checks if some code can be parsed and typechecks ok

    This macro checks if some code can be parsed and typechecks ok

    Credits:

    • Stefan Zeiger (@StefanZeiger) for the typecheck method
    • Jean-Remi Desjardins (@jrdesjardins) for the tc interpolator
  22. object TypecheckSuccess extends TypecheckResult

    Permalink
  23. object Typechecked extends Serializable

    Permalink

Ungrouped