ResultLogicalCombinators

org.specs2.execute.ResultLogicalCombinators
See theResultLogicalCombinators companion object

This trait provides logical combinators for Booleans and Results: and, or, not

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

The implicit definitions can not be easily replaced with extension methods otherwise this brings too many conflicts with the synthetized method names, like extension_and for both the extension for a Boolean value and a Result

Attributes

Companion
object
Graph
Supertypes
trait Results
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any

Inherited classlikes

object given_Conversion_Boolean_Result extends Conversion[Boolean, Result]

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

Attributes

Inherited from:
Results
Supertypes
class Conversion[Boolean, Result]
trait Boolean => Result
class Object
trait Matchable
class Any

Value members

Inherited methods

def negate(r: Result): Result

Attributes

Inherited from:
Results
def negateWhen(condition: Boolean)(r: Result): Result

Attributes

Inherited from:
Results
def toResult(b: Boolean): Result

Attributes

Inherited from:
Results

Givens

Inherited givens

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

Attributes

Inherited from:
Results

Implicits

Implicits

implicit def combineBoolean(b: => Boolean): ResultLogicalCombinator