com.wix.accord.scalatest

CombinatorTestSpec

trait CombinatorTestSpec extends WordSpec with Matchers with ResultMatchers

An opinionated helper trait for combinator specifications. The recommended practice for defining new combinators is test-first via this specification:

class MyCombinatorSpec extends WordSpec with ResultMatchers with Matchers {

def isMonotonous[ T ]: Validator[ Iterable[ T ] ] = ???

"isMonotonous" should {
  "successfully validate a monotonously-increasing sequence of numbers" in {
    isMonotonous( Seq( 1, 2, 3, 4, 5 ) ) should be( aSuccess )
  }

  "correctly render violations on a random sequence" in {
    isMonotonous( Seq( 5, 4, 3, 2, 1 ) ) should failWith( "is not monotonously-increasing" )
  }
}

}
Linear Supertypes
ResultMatchers, Matchers, Explicitly, MatcherWords, Tolerance, WordSpec, WordSpecLike, Documenting, Alerting, Notifying, Informing, CanVerb, MustVerb, ShouldVerb, TestRegistration, Suite, Serializable, AbstractSuite, Assertions, TripleEquals, TripleEqualsSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CombinatorTestSpec
  2. ResultMatchers
  3. Matchers
  4. Explicitly
  5. MatcherWords
  6. Tolerance
  7. WordSpec
  8. WordSpecLike
  9. Documenting
  10. Alerting
  11. Notifying
  12. Informing
  13. CanVerb
  14. MustVerb
  15. ShouldVerb
  16. TestRegistration
  17. Suite
  18. Serializable
  19. AbstractSuite
  20. Assertions
  21. TripleEquals
  22. TripleEqualsSupport
  23. AnyRef
  24. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final class AWord extends AnyRef

    Definition Classes
    Matchers
  2. final class AfterWord extends AnyRef

    Attributes
    protected
    Definition Classes
    WordSpecLike
  3. final class AnWord extends AnyRef

    Definition Classes
    Matchers
  4. sealed class AnyShouldWrapper[T] extends AnyRef

    Definition Classes
    Matchers
  5. class AssertionsHelper extends AnyRef

    Definition Classes
    Assertions
  6. class CheckingEqualizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  7. class DecidedByEquality[A] extends Equality[A]

    Definition Classes
    Explicitly
  8. class DecidedWord extends AnyRef

    Definition Classes
    Explicitly
  9. class DeterminedByEquivalence[T] extends Equivalence[T]

    Definition Classes
    Explicitly
  10. class DeterminedWord extends AnyRef

    Definition Classes
    Explicitly
  11. class Equalizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  12. case class GroupViolationMatcher(value: Any = null, constraint: String = null, legacyDescription: String = null, path: Path = null, violations: Set[(ResultMatchers.this)#ViolationMatcher] = null) extends (ResultMatchers.this)#ViolationMatcher with Product with Serializable

    A matcher over com.wix.accord.GroupViolations.

    A matcher over com.wix.accord.GroupViolations. To generate a violation rule "pattern", call the constructor with the required predicates, for example:

    val firstNameNotEmpty = RuleViolationMatcher( path = Path( Generic( "firstName" ) ), constraint = "must not be empty" ) val lastNameNotEmpty = RuleViolationMatcher( path = Path( Generic( "lastName" ) ), constraint = "must not be empty" ) val orPredicateFailed = GroupViolationMatcher( constraint = "doesn't meet any of the requirements", violations = firstNameNotEmpty :: lastNameNotEmpty :: Nil ) val validationResult: Result = ... validationResult must failWith( orPredicateFailed )

    value

    A predicate specifying the object under validation.

    constraint

    A predicate specifying the constraint being violated.

    legacyDescription

    Retained for backwards compatibility; matches against the rendered description of the object being validated. See com.wix.accord.Descriptions.render for details of how descriptions are rendered into strings.

    path

    A predicate specifying the path of the object being validated.

    violations

    The set of violations that comprise the group being validated.

    Definition Classes
    ResultMatchers
    See also

    com.wix.accord.GroupViolation

  13. final class HavePropertyMatcherGenerator extends AnyRef

    Definition Classes
    Matchers
  14. final class ItWord extends AnyRef

    Attributes
    protected
    Definition Classes
    WordSpecLike
  15. final class KeyWord extends AnyRef

    Definition Classes
    Matchers
  16. class LegacyCheckingEqualizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  17. class LegacyEqualizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  18. trait NoArgTest extends () ⇒ Outcome with TestData

    Attributes
    protected
    Definition Classes
    Suite
  19. final class PlusOrMinusWrapper[T] extends AnyRef

    Definition Classes
    Tolerance
  20. final class RegexWord extends AnyRef

    Definition Classes
    Matchers
  21. final class RegexWrapper extends AnyRef

    Definition Classes
    Matchers
  22. case class ResultMatcher(expectedViolations: Set[(ResultMatchers.this)#ViolationMatcher]) extends Matcher[Result] with Product with Serializable

    A matcher over validation com.wix.accord.Results.

    A matcher over validation com.wix.accord.Results. Takes a set of expected violations and return a suitable match result in case of failure.

    expectedViolations

    The set of expected violations for this matcher.

    Definition Classes
    ResultMatchers
  23. class ResultOfBeWordForAny[T] extends AnyRef

    Definition Classes
    Matchers
  24. sealed class ResultOfBeWordForCollectedAny[T] extends AnyRef

    Definition Classes
    Matchers
  25. final class ResultOfBeWordForCollectedArray[T] extends ResultOfBeWordForCollectedAny[Array[T]]

    Definition Classes
    Matchers
  26. final class ResultOfCollectedAny[T] extends AnyRef

    Definition Classes
    Matchers
  27. final class ResultOfContainWordForCollectedAny[T] extends AnyRef

    Definition Classes
    Matchers
  28. final class ResultOfEndWithWordForCollectedString extends AnyRef

    Definition Classes
    Matchers
  29. final class ResultOfEndWithWordForString extends AnyRef

    Definition Classes
    Matchers
  30. final class ResultOfEvaluatingApplication extends AnyRef

    Definition Classes
    Matchers
  31. final class ResultOfFullyMatchWordForCollectedString extends AnyRef

    Definition Classes
    Matchers
  32. final class ResultOfFullyMatchWordForString extends AnyRef

    Definition Classes
    Matchers
  33. final class ResultOfHaveWordForCollectedExtent[A] extends AnyRef

    Definition Classes
    Matchers
  34. final class ResultOfHaveWordForExtent[A] extends AnyRef

    Definition Classes
    Matchers
  35. final class ResultOfIncludeWordForCollectedString extends AnyRef

    Definition Classes
    Matchers
  36. final class ResultOfIncludeWordForString extends AnyRef

    Definition Classes
    Matchers
  37. sealed class ResultOfNotWordForCollectedAny[T] extends AnyRef

    Definition Classes
    Matchers
  38. final class ResultOfProduceInvocation[T] extends AnyRef

    Definition Classes
    Matchers
  39. final class ResultOfStartWithWordForCollectedString extends AnyRef

    Definition Classes
    Matchers
  40. final class ResultOfStartWithWordForString extends AnyRef

    Definition Classes
    Matchers
  41. final class ResultOfTaggedAsInvocationOnString extends AnyRef

    Attributes
    protected
    Definition Classes
    WordSpecLike
  42. case class RuleViolationMatcher(value: Any = null, constraint: String = null, legacyDescription: String = null, path: Path = null) extends (ResultMatchers.this)#ViolationMatcher with Product with Serializable

    A matcher over com.wix.accord.RuleViolations.

    A matcher over com.wix.accord.RuleViolations. To generate a violation rule "pattern", call the constructor with the required predicates, for example:

    val firstNameNotEmpty = RuleViolationMatcher( description = Path( Generic( "firstName" ) ), constraint = "must not be empty" ) val validationResult: Result = ... validationResult must failWith( firstNameNotEmpty )

    value

    A predicate specifying the object under validation.

    constraint

    A predicate specifying the constraint being violated.

    legacyDescription

    Retained for backwards compatibility; matches against the rendered description of the object being validated. See com.wix.accord.Descriptions.render for details of how descriptions are rendered into strings.

    path

    A predicate specifying the path to the object being validated.

    Definition Classes
    ResultMatchers
    See also

    com.wix.accord.RuleViolation

  43. trait StringCanWrapperForVerb extends AnyRef

    Definition Classes
    CanVerb
  44. trait StringMustWrapperForVerb extends AnyRef

    Definition Classes
    MustVerb
  45. final class StringShouldWrapper extends AnyShouldWrapper[String] with org.scalatest.Matchers.StringShouldWrapperForVerb

    Definition Classes
    Matchers
  46. trait StringShouldWrapperForVerb extends AnyRef

    Definition Classes
    ShouldVerb
  47. class TheAfterWord extends AnyRef

    Definition Classes
    Explicitly
  48. final class TheSameInstanceAsPhrase extends AnyRef

    Definition Classes
    Matchers
  49. final class TheyWord extends AnyRef

    Attributes
    protected
    Definition Classes
    WordSpecLike
  50. final class ValueWord extends AnyRef

    Definition Classes
    Matchers
  51. sealed trait ViolationMatcher extends Matcher[Violation]

    Abstracts over validators for the various violation type.

    Abstracts over validators for the various violation type.

    Definition Classes
    ResultMatchers
  52. final class WordSpecStringWrapper extends AnyRef

    Attributes
    protected
    Definition Classes
    WordSpecLike

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. def !==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]

    Definition Classes
    TripleEqualsSupport
  3. def !==(right: Null): TripleEqualsInvocation[Null]

    Definition Classes
    TripleEqualsSupport
  4. def !==[T](right: T): TripleEqualsInvocation[T]

    Definition Classes
    TripleEqualsSupport
  5. final def ##(): Int

    Definition Classes
    AnyRef → Any
  6. def <[T](right: T)(implicit arg0: Ordering[T]): ResultOfLessThanComparison[T]

    Definition Classes
    Matchers
  7. def <=[T](right: T)(implicit arg0: Ordering[T]): ResultOfLessThanOrEqualToComparison[T]

    Definition Classes
    Matchers
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def ===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]

    Definition Classes
    TripleEqualsSupport
  10. def ===(right: Null): TripleEqualsInvocation[Null]

    Definition Classes
    TripleEqualsSupport
  11. def ===[T](right: T): TripleEqualsInvocation[T]

    Definition Classes
    TripleEqualsSupport
  12. def >[T](right: T)(implicit arg0: Ordering[T]): ResultOfGreaterThanComparison[T]

    Definition Classes
    Matchers
  13. def >=[T](right: T)(implicit arg0: Ordering[T]): ResultOfGreaterThanOrEqualToComparison[T]

    Definition Classes
    Matchers
  14. def a[T](implicit arg0: Manifest[T]): ResultOfATypeInvocation[T]

    Definition Classes
    Matchers
  15. val a: AWord

    Definition Classes
    Matchers
  16. val aFailure: BeMatcher[Result]

    Enables syntax like someResult should be( aFailure )

    Enables syntax like someResult should be( aFailure )

    Definition Classes
    ResultMatchers
  17. val aSuccess: BeMatcher[Result]

    Enables syntax like someResult should be( aSuccess )

    Enables syntax like someResult should be( aSuccess )

    Definition Classes
    ResultMatchers
  18. val after: TheAfterWord

    Definition Classes
    Explicitly
  19. def afterWord(text: String): AfterWord

    Attributes
    protected
    Definition Classes
    WordSpecLike
  20. def alert: Alerter

    Attributes
    protected
    Definition Classes
    WordSpecLike → Alerting
  21. def all(xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  22. def all[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  23. def all[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  24. def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfAllOfApplication

    Definition Classes
    Matchers
  25. def an[T](implicit arg0: Manifest[T]): ResultOfAnTypeInvocation[T]

    Definition Classes
    Matchers
  26. val an: AnWord

    Definition Classes
    Matchers
  27. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  28. macro def assert(condition: Boolean, clue: Any): Unit

    Definition Classes
    Assertions
  29. macro def assert(condition: Boolean): Unit

    Definition Classes
    Assertions
  30. macro def assertCompiles(code: String): Unit

    Definition Classes
    Assertions
  31. macro def assertDoesNotCompile(code: String): Unit

    Definition Classes
    Assertions
  32. def assertResult(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
  33. def assertResult(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
  34. macro def assertTypeError(code: String): Unit

    Definition Classes
    Assertions
  35. val assertionsHelper: AssertionsHelper

    Definition Classes
    Assertions
  36. macro def assume(condition: Boolean, clue: Any): Unit

    Definition Classes
    Assertions
  37. macro def assume(condition: Boolean): Unit

    Definition Classes
    Assertions
  38. def atLeast(num: Int, xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  39. def atLeast[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  40. def atLeast[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  41. def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfAtLeastOneOfApplication

    Definition Classes
    Matchers
  42. def atMost(num: Int, xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  43. def atMost[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  44. def atMost[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  45. def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfAtMostOneOfApplication

    Definition Classes
    Matchers
  46. val be: BeWord

    Definition Classes
    MatcherWords
  47. val behave: BehaveWord

    Attributes
    protected
    Definition Classes
    WordSpecLike
  48. def between(from: Int, upTo: Int, xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  49. def between[K, V, JMAP[k, v] <: Map[k, v]](from: Int, upTo: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  50. def between[E, C[_]](from: Int, upTo: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  51. def cancel(cause: Throwable): Nothing

    Definition Classes
    Assertions
  52. def cancel(message: String, cause: Throwable): Nothing

    Definition Classes
    Assertions
  53. def cancel(message: String): Nothing

    Definition Classes
    Assertions
  54. def cancel(): Nothing

    Definition Classes
    Assertions
  55. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. val compile: CompileWord

    Definition Classes
    MatcherWords
  57. val contain: ContainWord

    Definition Classes
    MatcherWords
  58. def conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) ⇒ A): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  59. def convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  60. def convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) ⇒ B): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  61. def convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  62. def convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) ⇒ A): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  63. implicit def convertNumericToPlusOrMinusWrapper[T](pivot: T)(implicit arg0: Numeric[T]): PlusOrMinusWrapper[T]

    Definition Classes
    Tolerance
  64. implicit def convertSymbolToHavePropertyMatcherGenerator(symbol: Symbol): HavePropertyMatcherGenerator

    Definition Classes
    Matchers
  65. implicit def convertToAnyShouldWrapper[T](o: T): AnyShouldWrapper[T]

    Definition Classes
    Matchers
  66. def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  67. implicit def convertToEqualizer[T](left: T): Equalizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  68. def convertToLegacyCheckingEqualizer[T](left: T): LegacyCheckingEqualizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  69. def convertToLegacyEqualizer[T](left: T): LegacyEqualizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  70. implicit def convertToRegexWrapper(o: Regex): RegexWrapper

    Definition Classes
    Matchers
  71. implicit def convertToStringCanWrapper(o: String): StringCanWrapperForVerb

    Definition Classes
    CanVerb
  72. implicit def convertToStringMustWrapper(o: String): StringMustWrapperForVerb

    Definition Classes
    MustVerb
  73. implicit def convertToStringShouldWrapper(o: String): StringShouldWrapper

    Definition Classes
    Matchers → ShouldVerb
  74. implicit def convertToWordSpecStringWrapper(s: String): WordSpecStringWrapper

    Attributes
    protected
    Definition Classes
    WordSpecLike
  75. val decided: DecidedWord

    Definition Classes
    Explicitly
  76. def defaultEquality[A]: Equality[A]

    Definition Classes
    TripleEqualsSupport
  77. val defined: DefinedWord

    Definition Classes
    MatcherWords
  78. def definedAt[T](right: T): ResultOfDefinedAt[T]

    Definition Classes
    Matchers
  79. val determined: DeterminedWord

    Definition Classes
    Explicitly
  80. implicit def elevateStringToRuleViolationMatcher(s: String): RuleViolationMatcher

  81. val empty: EmptyWord

    Definition Classes
    MatcherWords
  82. val endWith: EndWithWord

    Definition Classes
    MatcherWords
  83. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  84. def equal(o: Null): Matcher[AnyRef]

    Definition Classes
    Matchers
  85. def equal[T](spread: Spread[T]): Matcher[T]

    Definition Classes
    Matchers
  86. def equal(right: Any): MatcherFactory1[Any, Equality]

    Definition Classes
    MatcherWords
  87. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  88. def every(xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  89. def every[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  90. def every[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  91. def exactly(num: Int, xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  92. def exactly[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  93. def exactly[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  94. final def execute: Unit

    Definition Classes
    Suite
  95. final def execute(testName: String, configMap: ConfigMap, color: Boolean, durations: Boolean, shortstacks: Boolean, fullstacks: Boolean, stats: Boolean): Unit

    Definition Classes
    Suite
  96. val exist: ExistWord

    Definition Classes
    MatcherWords
  97. def expectedTestCount(filter: Filter): Int

    Definition Classes
    Suite → AbstractSuite
  98. def fail(cause: Throwable): Nothing

    Definition Classes
    Assertions
  99. def fail(message: String, cause: Throwable): Nothing

    Definition Classes
    Assertions
  100. def fail(message: String): Nothing

    Definition Classes
    Assertions
  101. def fail(): Nothing

    Definition Classes
    Assertions
  102. def failWith(expectedViolations: ViolationMatcher*): Matcher[Result]

    A convenience method for matching failures.

    A convenience method for matching failures. Enables syntax like:

    val result: Result = ... result should failWith( Path( Generic( "firstName" ) ) -> "must not be empty", Path( Generic( "lastName" ) ) -> "must not be empty" )

    expectedViolations

    The set of expected violations.

    returns

    A matcher over validation com.wix.accord.Results.

    Definition Classes
    ResultMatchers
  103. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  104. val fullyMatch: FullyMatchWord

    Definition Classes
    MatcherWords
  105. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  106. def group[T](path: Path, constraint: String, expectedViolations: T*)(implicit ev: (T) ⇒ RuleViolationMatcher): GroupViolationMatcher

    A convenience method for matching violation groups.

    A convenience method for matching violation groups. Enables syntax like:

    val result: Result = ... result should failWith( group( Path( Generic( "teacher" ) ), "is invalid", // The group context Path( Generic( "firstName ) ) -> "must not be empty" ) ) // The rule violations

    path

    A predicate specifying the path to the object being validated.

    constraint

    A textual description of the constraint being violated (for example, "must not be empty").

    expectedViolations

    The set of expected violations that comprise the group.

    returns

    A matcher over com.wix.accord.GroupViolations.

    Definition Classes
    ResultMatchers
  107. def group(path: Path, constraint: String, expectedViolations: (Path, String)*): GroupViolationMatcher

    A convenience method for matching violation groups.

    A convenience method for matching violation groups. Enables syntax like:

    val result: Result = ... result should failWith( group( Path( Generic( "teacher" ) ), "is invalid", // The group context Path( Generic( "firstName ) ) -> "must not be empty" ) ) // The rule violations

    path

    A predicate specifying the path to the object being validated.

    constraint

    A textual description of the constraint being violated (for example, "must not be empty").

    expectedViolations

    The set of expected violations that comprise the group.

    returns

    A matcher over com.wix.accord.GroupViolations.

    Definition Classes
    ResultMatchers
  108. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  109. val have: HaveWord

    Definition Classes
    MatcherWords
  110. def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfInOrderApplication

    Definition Classes
    Matchers
  111. def inOrderOnly[T](firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfInOrderOnlyApplication

    Definition Classes
    Matchers
  112. val include: IncludeWord

    Definition Classes
    MatcherWords
  113. def info: Informer

    Attributes
    protected
    Definition Classes
    WordSpecLike → Informing
  114. def intercept[T <: AnyRef](f: ⇒ Any)(implicit manifest: Manifest[T]): T

    Definition Classes
    Assertions
  115. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  116. val it: ItWord

    Attributes
    protected
    Definition Classes
    WordSpecLike
  117. val key: KeyWord

    Definition Classes
    Matchers
  118. val length: LengthWord

    Definition Classes
    MatcherWords
  119. def lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) ⇒ B): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  120. def lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  121. def markup: Documenter

    Attributes
    protected
    Definition Classes
    WordSpecLike → Documenting
  122. val matchPattern: MatchPatternWord

    Definition Classes
    MatcherWords
  123. def message(expectedMessage: String): ResultOfMessageWordApplication

    Definition Classes
    Matchers
  124. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  125. def nestedSuites: IndexedSeq[Suite]

    Definition Classes
    Suite → AbstractSuite
  126. def no(xs: String)(implicit collecting: Collecting[Char, String]): ResultOfCollectedAny[Char]

    Definition Classes
    Matchers
  127. def no[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]]): ResultOfCollectedAny[Entry[K, V]]

    Definition Classes
    Matchers
  128. def no[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]]): ResultOfCollectedAny[E]

    Definition Classes
    Matchers
  129. val noException: NoExceptionWord

    Definition Classes
    MatcherWords
  130. def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfNoneOfApplication

    Definition Classes
    Matchers
  131. val not: NotWord

    Definition Classes
    MatcherWords
  132. def note: Notifier

    Attributes
    protected
    Definition Classes
    WordSpecLike → Notifying
  133. final def notify(): Unit

    Definition Classes
    AnyRef
  134. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  135. def of[T](implicit ev: Manifest[T]): ResultOfOfTypeInvocation[T]

    Definition Classes
    Matchers
  136. def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): ResultOfOneOfApplication

    Definition Classes
    Matchers
  137. def only(xs: Any*): ResultOfOnlyApplication

    Definition Classes
    Matchers
  138. implicit def path2RuleViolationMatcher(path: Path): RuleViolationMatcher

    A convenience implicit to simplify test code.

    A convenience implicit to simplify test code. Enables syntax like:

    val rule: RuleViolationMatcher = Path( Generic( "firstName" ) ) // ... which is equivalent to val rule = RuleViolationMatcher( path = Path( Generic( "firstName" ) ) )

    Definition Classes
    ResultMatchers
  139. implicit def pathAndConstraintTuple2RuleMatcher(v: (Path, String)): RuleViolationMatcher

    A convenience implicit to simplify test code.

    A convenience implicit to simplify test code. Enables syntax like:

    val rule: RuleViolationMatcher = Path( Generic( "firstName" ) ) -> "must not be empty" // ... which is equivalent to val rule = RuleViolationMatcher( path = Path( Generic( "firstName" ) ), constraint = "must not be empty" )

    Definition Classes
    ResultMatchers
  140. def pending: PendingNothing

    Definition Classes
    Suite
  141. def pendingUntilFixed(f: ⇒ Unit): Unit

    Definition Classes
    Suite
  142. def produce[T](implicit arg0: Manifest[T]): ResultOfProduceInvocation[T]

    Definition Classes
    Matchers
  143. val readable: ReadableWord

    Definition Classes
    MatcherWords
  144. val regex: RegexWord

    Definition Classes
    Matchers
  145. final def registerIgnoredTest(testText: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Definition Classes
    WordSpecLike → TestRegistration
  146. final def registerTest(testText: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Definition Classes
    WordSpecLike → TestRegistration
  147. def rerunner: Option[String]

    Definition Classes
    Suite → AbstractSuite
  148. def run(testName: Option[String], args: Args): Status

    Definition Classes
    WordSpecLike → Suite → AbstractSuite
  149. final def run(testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker): Status

    Definition Classes
    AbstractSuite
  150. def runNestedSuites(args: Args): Status

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite
  151. def runTest(testName: String, args: Args): Status

    Attributes
    protected
    Definition Classes
    WordSpecLike → Suite → AbstractSuite
  152. def runTests(testName: Option[String], args: Args): Status

    Attributes
    protected
    Definition Classes
    WordSpecLike → Suite → AbstractSuite
  153. val size: SizeWord

    Definition Classes
    MatcherWords
  154. val sorted: SortedWord

    Definition Classes
    MatcherWords
  155. val startWith: StartWithWord

    Definition Classes
    MatcherWords
  156. final val styleName: String

    Definition Classes
    WordSpecLike → Suite → AbstractSuite
  157. implicit val subjectRegistrationFunction: StringVerbBlockRegistration

    Attributes
    protected
    Definition Classes
    WordSpecLike
  158. implicit val subjectWithAfterWordRegistrationFunction: (String, String, ResultOfAfterWordApplication) ⇒ Unit

    Attributes
    protected
    Definition Classes
    WordSpecLike
  159. def suiteId: String

    Definition Classes
    Suite
  160. def suiteName: String

    Definition Classes
    Suite
  161. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  162. def tags: Map[String, Set[String]]

    Definition Classes
    WordSpecLike → Suite → AbstractSuite
  163. def testDataFor(testName: String, theConfigMap: ConfigMap): TestData

    Definition Classes
    WordSpecLike → Suite
  164. def testNames: Set[String]

    Definition Classes
    WordSpecLike → Suite → AbstractSuite
  165. def the[T](implicit arg0: Manifest[T]): ResultOfTheTypeInvocation[T]

    Definition Classes
    Matchers
  166. def theSameElementsAs(xs: GenTraversable[_]): ResultOfTheSameElementsAsApplication

    Definition Classes
    Matchers
  167. def theSameElementsInOrderAs(xs: GenTraversable[_]): ResultOfTheSameElementsInOrderAsApplication

    Definition Classes
    Matchers
  168. val theSameInstanceAs: TheSameInstanceAsPhrase

    Definition Classes
    Matchers
  169. val they: TheyWord

    Attributes
    protected
    Definition Classes
    WordSpecLike
  170. def thrownBy(fun: ⇒ Any): ResultOfThrownByApplication

    Definition Classes
    Matchers
  171. def toString(): String

    Definition Classes
    WordSpec → AnyRef → Any
  172. def trap[T](f: ⇒ T): Throwable

    Definition Classes
    Assertions
  173. val typeCheck: TypeCheckWord

    Definition Classes
    MatcherWords
  174. def typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  175. implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  176. val value: ValueWord

    Definition Classes
    Matchers
  177. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  178. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  179. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  180. def withClue[T](clue: Any)(fun: ⇒ T): T

    Definition Classes
    Assertions
  181. def withFixture(test: NoArgTest): Outcome

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite
  182. val writable: WritableWord

    Definition Classes
    MatcherWords

Deprecated Value Members

  1. def assert(o: Option[String]): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  2. def assert(o: Option[String], clue: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  3. def assume(o: Option[String]): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  4. def assume(o: Option[String], clue: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  5. implicit def description2RuleViolationMatcher(desc: Description): RuleViolationMatcher

    A convenience implicit to simplify test code.

    A convenience implicit to simplify test code. Enables syntax like:

    val rule: RuleViolationMatcher = Generic( "firstName" ) // ... which is equivalent to val rule = RuleViolationMatcher( path = Path( Generic( "firstName" ) ) )

    Definition Classes
    ResultMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 0.7)

  6. implicit def descriptionAndConstraintTuple2RuleMatcher(v: (Description, String)): RuleViolationMatcher

    A convenience implicit to simplify test code.

    A convenience implicit to simplify test code. Enables syntax like:

    val rule: RuleViolationMatcher = Generic( "firstName" ) -> "must not be empty" // ... which is equivalent to val rule = RuleViolationMatcher( path = Path( Generic( "firstName" ) ), constraint = "must not be empty" )

    Definition Classes
    ResultMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 0.7)

  7. def evaluating(fun: ⇒ Any): ResultOfEvaluatingApplication

    Definition Classes
    Matchers
    Annotations
    @deprecated
    Deprecated

    Please use 'an [Exception] should be thrownBy { ... }' syntax instead

  8. def expect(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.

  9. def expect(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.

  10. def expectResult(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.

  11. def expectResult(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.

  12. def group[T](legacyDescription: String, constraint: String, expectedViolations: T*)(implicit ev: (T) ⇒ RuleViolationMatcher): GroupViolationMatcher

    A convenience method for matching violation groups.

    A convenience method for matching violation groups. Enables syntax like:

    val result: Result = ... result should failWith( group( "teacher", "is invalid", // The group context "firstName" -> "must not be empty" ) ) // The rule violations

    legacyDescription

    Retained for backwards compatibility; matches against the rendered description of the object being validated. See com.wix.accord.Descriptions.render for details of how descriptions are rendered into strings.

    constraint

    A textual description of the constraint being violated (for example, "must not be empty").

    expectedViolations

    The set of expected violations that comprise the group.

    returns

    A matcher over com.wix.accord.GroupViolations.

    Definition Classes
    ResultMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6) Intended for backwards compatibility. It is recommended to match against paths instead.

  13. def group(legacyDescription: String, constraint: String, expectedViolations: (String, String)*): GroupViolationMatcher

    A convenience method for matching violation groups.

    A convenience method for matching violation groups. Enables syntax like:

    val result: Result = ... result should failWith( group( "teacher", "is invalid", // The group context "firstName" -> "must not be empty" ) ) // The rule violations

    legacyDescription

    Retained for backwards compatibility; matches against the rendered description of the object being validated. See com.wix.accord.Descriptions.render for details of how descriptions are rendered into strings.

    constraint

    A textual description of the constraint being violated (for example, "must not be empty").

    expectedViolations

    The set of expected violations that comprise the group.

    returns

    A matcher over com.wix.accord.GroupViolations.

    Definition Classes
    ResultMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6) Intended for backwards compatibility. It is recommended to match against paths instead.

  14. implicit def stringTuple2RuleMatcher(v: (String, String)): RuleViolationMatcher

    A convenience implicit to simplify test code.

    A convenience implicit to simplify test code. Enables syntax like:

    val rule: RuleViolationMatcher = "firstName" -> "must not be empty" // ... which is equivalent to val rule = RuleViolationMatcher( legacyDescription = "firstName", constraint = "must not be empty" )

    Definition Classes
    ResultMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6)

Inherited from ResultMatchers

Inherited from Matchers

Inherited from Explicitly

Inherited from MatcherWords

Inherited from Tolerance

Inherited from WordSpec

Inherited from WordSpecLike

Inherited from Documenting

Inherited from Alerting

Inherited from Notifying

Inherited from Informing

Inherited from CanVerb

Inherited from MustVerb

Inherited from ShouldVerb

Inherited from TestRegistration

Inherited from Suite

Inherited from Serializable

Inherited from AbstractSuite

Inherited from Assertions

Inherited from TripleEquals

Inherited from TripleEqualsSupport

Inherited from AnyRef

Inherited from Any

Ungrouped