com.wix.accord.specs2.ResultMatchers

GroupViolationMatcher

case class GroupViolationMatcher(value: Any = null, constraint: String = null, description: String = 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 = "firstName", constraint = "must not be empty" ) val lastNameNotEmpty = RuleViolationMatcher( description = "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.

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, description: String = null, violations: Set[ViolationMatcher] = null)

    value

    A predicate specifying the object under validation.

    constraint

    A predicate specifying the constraint being violated.

    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: Any): Boolean

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

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

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

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

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

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

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

    Definition Classes
    Any
  9. def clone(): AnyRef

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

    A predicate specifying the constraint being violated.

  11. val description: String

    A predicate specifying the description of the object being validated.

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

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

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

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

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

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

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

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

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

    Definition Classes
    Matcher
  21. def mute: Matcher[Violation]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    Matcher
  44. def toString(): String

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

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

    Definition Classes
    Matcher
  47. val value: Any

    A predicate specifying the object under validation.

  48. val violations: Set[ViolationMatcher]

    The set of violations that comprise the group being validated.

  49. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. 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