com.wix.accord.specs2.ResultMatchers

GroupViolationMatcher

case class GroupViolationMatcher(value: Any = null, constraint: String = null, legacyDescription: String = null, description: Description = null, violations: Set[ViolationMatcher] = null) extends ViolationMatcher with Product with Serializable

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( description = AccessChain( "firstName" ), constraint = "must not be empty" ) val lastNameNotEmpty = RuleViolationMatcher( description = AccessChain( "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.

description

A predicate specifying the description of the object being validated.

violations

The set of violations that comprise the group being validated.

See also

com.wix.accord.GroupViolation

Linear Supertypes
Serializable, Serializable, Product, Equals, ViolationMatcher, Matcher[Violation], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GroupViolationMatcher
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ViolationMatcher
  7. Matcher
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GroupViolationMatcher(value: Any = null, constraint: String = null, legacyDescription: String = null, description: Description = null, violations: Set[ViolationMatcher] = null)

    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.

    description

    A predicate specifying the description of the object being validated.

    violations

    The set of violations that comprise the group being validated.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def ^^[S](f: (S) ⇒ Expectable[Violation], dummy: Int): Matcher[S]

    Definition Classes
    Matcher
  7. def ^^[S](f: (S) ⇒ Violation): Matcher[S]

    Definition Classes
    Matcher
  8. def and[S <: Violation](m: ⇒ Matcher[S]): Matcher[S]

    Definition Classes
    Matcher
  9. def apply[T <: Violation](left: Expectable[T]): MatchResult[T]

    Definition Classes
    GroupViolationMatcher → Matcher
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. val constraint: String

    A predicate specifying the constraint being violated.

  13. val description: Description

    A predicate specifying the description of the object being validated.

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def eventually(retries: Int, sleep: Duration): Matcher[Violation]

    Definition Classes
    Matcher
  16. def eventually: Matcher[Violation]

    Definition Classes
    Matcher
  17. def failure[S <: Violation](message: ⇒ String, value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def iff(b: Boolean): Matcher[Violation]

    Definition Classes
    Matcher
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. def lazily: Matcher[() ⇒ Violation]

    Definition Classes
    Matcher
  23. val legacyDescription: String

    Retained for backwards compatibility; matches against the rendered description of the object being validated.

    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.

  24. def mute: Matcher[Violation]

    Definition Classes
    Matcher
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def not: Matcher[Violation]

    Definition Classes
    Matcher
  27. final def notify(): Unit

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

    Definition Classes
    AnyRef
  29. def or[S <: Violation](m: ⇒ Matcher[S]): Matcher[S]

    Definition Classes
    Matcher
  30. def orPending(message: (String) ⇒ String): Matcher[Violation]

    Definition Classes
    Matcher
  31. def orPending(m: String): Matcher[Violation]

    Definition Classes
    Matcher
  32. def orPending: Matcher[Violation]

    Definition Classes
    Matcher
  33. def orSkip(message: (String) ⇒ String): Matcher[Violation]

    Definition Classes
    Matcher
  34. def orSkip(m: String): Matcher[Violation]

    Definition Classes
    Matcher
  35. def orSkip: Matcher[Violation]

    Definition Classes
    Matcher
  36. def result[S <: Violation](other: org.specs2.matcher.MatchResultMessages.MatchResultMessage, value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  37. def result[S <: Violation](other: org.specs2.execute.Result, value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  38. def result[S <: Violation](other: MatchResult[_], value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  39. def result[S <: Violation](test: ⇒ Boolean, okMessage: ⇒ String, koMessage: ⇒ String, value: Expectable[S], details: Details): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  40. def result[S <: Violation](test: ⇒ Boolean, okMessage: ⇒ String, koMessage: ⇒ String, value: Expectable[S], expected: String, actual: String): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  41. def result[S <: Violation](triplet: ⇒ (Boolean, String, String), value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  42. def result[S <: Violation](test: ⇒ Boolean, okMessage: ⇒ String, koMessage: ⇒ String, value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  43. def setMessage(message: String): Matcher[Violation]

    Definition Classes
    Matcher
  44. def success[S <: Violation](message: ⇒ String, value: Expectable[S]): MatchResult[S]

    Attributes
    protected
    Definition Classes
    Matcher
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def test: (Violation) ⇒ Boolean

    Definition Classes
    Matcher
  47. def toString(): String

    Definition Classes
    GroupViolationMatcher → AnyRef → Any
  48. def unless(b: Boolean, m: String): Matcher[Violation]

    Definition Classes
    Matcher
  49. def updateMessage(f: (String) ⇒ String): Matcher[Violation]

    Definition Classes
    Matcher
  50. val value: Any

    A predicate specifying the object under validation.

  51. val violations: Set[ViolationMatcher]

    The set of violations that comprise the group being validated.

  52. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. def when(b: Boolean, m: String): Matcher[Violation]

    Definition Classes
    Matcher

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ViolationMatcher

Inherited from Matcher[Violation]

Inherited from AnyRef

Inherited from Any

Ungrouped