Class

com.wix.accord.specs2.ResultMatchers

GroupViolationMatcher

Related Doc: package ResultMatchers

Permalink

case class GroupViolationMatcher(value: Any = null, constraint: String = null, legacyDescription: String = null, path: Path = 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( 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.

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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.

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

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

    Permalink

    A predicate specifying the constraint being violated.

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

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

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

    Permalink
    Definition Classes
    Matcher
  14. def eventually: Matcher[Violation]

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

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

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

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

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

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

    Permalink
    Definition Classes
    Matcher
  21. val legacyDescription: String

    Permalink

    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.

  22. def mute: Matcher[Violation]

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

    Permalink
    Definition Classes
    AnyRef
  24. def not: Matcher[Violation]

    Permalink
    Definition Classes
    Matcher
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

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

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

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

    Permalink
    Definition Classes
    Matcher
  30. def orPending: Matcher[Violation]

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

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

    Permalink
    Definition Classes
    Matcher
  33. def orSkip: Matcher[Violation]

    Permalink
    Definition Classes
    Matcher
  34. val path: Path

    Permalink

    A predicate specifying the path of the object being validated.

    A predicate specifying the path of the object being validated.

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Matcher
  46. def toString(): String

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

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

    Permalink
    Definition Classes
    Matcher
  49. val value: Any

    Permalink

    A predicate specifying the object under validation.

  50. val violations: Set[ViolationMatcher]

    Permalink

    The set of violations that comprise the group being validated.

  51. final def wait(): Unit

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

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

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

    Permalink
    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