Class

com.wix.accord.scalatest.ResultMatchers

RuleViolationMatcher

Related Doc: package ResultMatchers

Permalink

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. 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.

See also

com.wix.accord.RuleViolation

Linear Supertypes
Serializable, Serializable, Product, Equals, (ResultMatchers.this)#ViolationMatcher, Matcher[Violation], (Violation) ⇒ MatchResult, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RuleViolationMatcher
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ViolationMatcher
  7. Matcher
  8. Function1
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RuleViolationMatcher(value: Any = null, constraint: String = null, legacyDescription: String = null, path: Path = 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 to the object being validated.

Type Members

  1. final class AndBeWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  2. final class AndContainWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  3. final class AndEndWithWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  4. final class AndFullyMatchWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  5. final class AndHaveWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  6. final class AndIncludeWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  7. final class AndNotWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  8. final class AndStartWithWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  9. final class OrBeWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  10. final class OrContainWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  11. final class OrEndWithWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  12. final class OrFullyMatchWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  13. final class OrHaveWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  14. final class OrIncludeWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  15. final class OrNotWord extends AnyRef

    Permalink
    Definition Classes
    Matcher
  16. final class OrStartWithWord extends AnyRef

    Permalink
    Definition Classes
    Matcher

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 and(notExist: ResultOfNotExist): MatcherFactory1[Violation, Existence]

    Permalink
    Definition Classes
    Matcher
  5. def and(existWord: ExistWord): MatcherFactory1[Violation, Existence]

    Permalink
    Definition Classes
    Matcher
  6. def and(notWord: NotWord): AndNotWord

    Permalink
    Definition Classes
    Matcher
  7. def and(endWithWord: EndWithWord): AndEndWithWord

    Permalink
    Definition Classes
    Matcher
  8. def and(startWithWord: StartWithWord): AndStartWithWord

    Permalink
    Definition Classes
    Matcher
  9. def and(includeWord: IncludeWord): AndIncludeWord

    Permalink
    Definition Classes
    Matcher
  10. def and(fullyMatchWord: FullyMatchWord): AndFullyMatchWord

    Permalink
    Definition Classes
    Matcher
  11. def and(beWord: BeWord): AndBeWord

    Permalink
    Definition Classes
    Matcher
  12. def and(containWord: ContainWord)(implicit prettifier: Prettifier, pos: Position): AndContainWord

    Permalink
    Definition Classes
    Matcher
  13. def and(haveWord: HaveWord): AndHaveWord

    Permalink
    Definition Classes
    Matcher
  14. def and[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[Violation with U, TC1]

    Permalink
    Definition Classes
    Matcher
  15. def and[U <: Violation](rightMatcher: Matcher[U]): Matcher[U]

    Permalink
    Definition Classes
    Matcher
  16. def andThen[A](g: (MatchResult) ⇒ A): (Violation) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  17. def apply(left: Violation): MatchResult

    Permalink
    Definition Classes
    RuleViolationMatcher → Matcher → Function1
  18. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def compose[U](g: (U) ⇒ Violation): Matcher[U]

    Permalink
    Definition Classes
    Matcher → Function1
  21. val constraint: String

    Permalink

    A predicate specifying the constraint being violated.

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

    Permalink
    Definition Classes
    AnyRef
  23. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. 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.

  27. def mapArgs(prettify: (Any) ⇒ String): Matcher[Violation]

    Permalink
    Definition Classes
    Matcher
  28. def mapResult(prettify: (MatchResult) ⇒ MatchResult): Matcher[Violation]

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

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  32. def or(notExist: ResultOfNotExist): MatcherFactory1[Violation, Existence]

    Permalink
    Definition Classes
    Matcher
  33. def or(existWord: ExistWord): MatcherFactory1[Violation, Existence]

    Permalink
    Definition Classes
    Matcher
  34. def or(notWord: NotWord): OrNotWord

    Permalink
    Definition Classes
    Matcher
  35. def or(endWithWord: EndWithWord): OrEndWithWord

    Permalink
    Definition Classes
    Matcher
  36. def or(startWithWord: StartWithWord): OrStartWithWord

    Permalink
    Definition Classes
    Matcher
  37. def or(includeWord: IncludeWord): OrIncludeWord

    Permalink
    Definition Classes
    Matcher
  38. def or(fullyMatchWord: FullyMatchWord): OrFullyMatchWord

    Permalink
    Definition Classes
    Matcher
  39. def or(beWord: BeWord): OrBeWord

    Permalink
    Definition Classes
    Matcher
  40. def or(containWord: ContainWord)(implicit prettifier: Prettifier, pos: Position): OrContainWord

    Permalink
    Definition Classes
    Matcher
  41. def or(haveWord: HaveWord): OrHaveWord

    Permalink
    Definition Classes
    Matcher
  42. def or[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[Violation with U, TC1]

    Permalink
    Definition Classes
    Matcher
  43. def or[U <: Violation](rightMatcher: Matcher[U]): Matcher[U]

    Permalink
    Definition Classes
    Matcher
  44. val path: Path

    Permalink

    A predicate specifying the path to the object being validated.

    A predicate specifying the path to the object being validated.

    Definition Classes
    RuleViolationMatcherViolationMatcher
  45. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    RuleViolationMatcher → Function1 → AnyRef → Any
  47. val value: Any

    Permalink

    A predicate specifying the object under validation.

  48. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from (ResultMatchers.this)#ViolationMatcher

Inherited from Matcher[Violation]

Inherited from (Violation) ⇒ MatchResult

Inherited from AnyRef

Inherited from Any

Ungrouped