JUnitDescriptions

trait JUnitDescriptions extends ExecutionOrigin

Create Description objects from the specification fragments and arrange them as a tree

Companion
object
trait ExecutionOrigin
trait Stacktraces
class Object
trait Matchable
class Any

Value members

Concrete methods

def createDescription(spec: SpecStructure)(ee: ExecutionEnv): Description
def createDescription(treeLoc: TreeLoc[Description]): Description
def createDescription(className: String, suiteName: String, testName: String, label: String, id: String, annotations: Array[Annotation]): Description
def createDescriptionTree(spec: SpecStructure)(ee: ExecutionEnv): TreeLoc[(Fragment, Description)]
def createTreeLoc(spec: SpecStructure)(ee: ExecutionEnv): TreeLoc[Description]
def fragmentDescriptions(spec: SpecStructure)(ee: ExecutionEnv): Map[Fragment, Description]

Map of each fragment to its description

Map of each fragment to its description

def keep: Mapper

filter out the fragments which don't need to be represented in the JUnit descriptions

filter out the fragments which don't need to be represented in the JUnit descriptions

def parentPath(parentNodes: Seq[Fragment]): Seq[String]
Returns

a seq containing the path of an example without the root name

def specDescription(spec: SpecStructure): Description

description for the beginning of the specification

description for the beginning of the specification

def testName(s: String, parentNodes: Seq[String]): String
Returns

a test name with no newlines

Inherited methods

def fromSpecs2(className: String): Boolean
Inherited from
ExecutionOrigin
def isExecutedFrom(name: String, st: Seq[StackTraceElement]): Boolean
Inherited from
Stacktraces
def isExecutedFrom(name: String): Boolean

This method is used to determine for example if the JUnit runner is executed from Maven or within Eclipse. In the first the test case names don't need to have the hashcode example.

This method is used to determine for example if the JUnit runner is executed from Maven or within Eclipse. In the first the test case names don't need to have the hashcode example.

Returns

true if this current piece of code contains name in its stacktrace.

Inherited from
Stacktraces
def isFromClass(classNamePredicate: String => Boolean, st: Seq[StackTraceElement]): Boolean
Returns

true if there is a stacktrace element satisfying the predicate

Inherited from
Stacktraces
def isFromClass(classNamePredicate: String => Boolean): Boolean
Returns

true if there is a stacktrace element satisfying the predicate

Inherited from
Stacktraces
def isSpecificationFromSpecs2(st: Seq[StackTraceElement]): Boolean

try to approximate if a specification is a specs2 by passing name = org.specs2

try to approximate if a specification is a specs2 by passing name = org.specs2

Inherited from
ExecutionOrigin

Inherited fields

lazy
Inherited from
ExecutionOrigin
lazy
val isExecutedFromAnIDE: Boolean

return true if the current test is executed from an IDE

return true if the current test is executed from an IDE

Inherited from
ExecutionOrigin
lazy
val isExecutedFromBazel: Boolean

return true if the current test is executed with Bazel

return true if the current test is executed with Bazel

Inherited from
ExecutionOrigin
lazy

return true if the current test is executed with eclipse

return true if the current test is executed with eclipse

Inherited from
ExecutionOrigin
lazy

return true if the current test is executed with Gradle

return true if the current test is executed with Gradle

Inherited from
ExecutionOrigin
lazy

return true if the current test is executed with Intellij

return true if the current test is executed with Intellij

Inherited from
ExecutionOrigin
lazy

return true if the current test is executed with JUnitCore

return true if the current test is executed with JUnitCore

Inherited from
ExecutionOrigin
lazy
val isExecutedFromMaven: Boolean

return true if the current test is executed with Maven

return true if the current test is executed with Maven

Inherited from
ExecutionOrigin
lazy
val isExecutedFromSBT: Boolean

return true if the current test is executed with sbt

return true if the current test is executed with sbt

Inherited from
ExecutionOrigin
lazy

return true if the current test is executed with Scala.js

return true if the current test is executed with Scala.js

Inherited from
ExecutionOrigin