PassAccessibilityChecksMatcher

uk.gov.hmrc.scalatestaccessibilitylinter.AccessibilityMatchers.PassAccessibilityChecksMatcher
class PassAccessibilityChecksMatcher(accessibilityLinters: Seq[Service], outputFormat: OutputFormat) extends Matcher[String]

Attributes

Graph
Supertypes
trait Matcher[String]
trait String => MatchResult
class Object
trait Matchable
class Any

Members list

Type members

Inherited classlikes

final class AndBeWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndContainWord(prettifier: Prettifier, pos: Position)

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndEndWithWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndFullyMatchWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndHaveWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndIncludeWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndNotWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class AndStartWithWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrBeWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrContainWord(prettifier: Prettifier, pos: Position)

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrEndWithWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrFullyMatchWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrHaveWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrIncludeWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrNotWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any
final class OrStartWithWord

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Attributes

Inherited from:
Matcher
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

override def apply(html: String): MatchResult

Check to see if the specified object, left, matches, and report the result in the returned MatchResult. The parameter is named left, because it is usually the value to the left of a should or must invocation. For example, in:

Check to see if the specified object, left, matches, and report the result in the returned MatchResult. The parameter is named left, because it is usually the value to the left of a should or must invocation. For example, in:

list should equal (List(1, 2, 3))

The equal (List(1, 2, 3)) expression results in a matcher that holds a reference to the right value, List(1, 2, 3). The should method invokes apply on this matcher, passing in list, which is therefore the "left" value. The matcher will compare the list (the left value) with List(1, 2, 3) (the right value), and report the result in the returned MatchResult.

Value parameters

left

the value against which to match

Attributes

Returns

the MatchResult that represents the result of the match

Definition Classes
Matcher -> Function1

Inherited methods

infix def and(notExist: ResultOfNotExist): MatcherFactory1[String, Existence]

This method enables the following syntax:

This method enables the following syntax:

aMatcher and not (exist)
        ^

Attributes

Inherited from:
Matcher
infix def and(existWord: ExistWord): MatcherFactory1[String, Existence]

This method enables the following syntax:

This method enables the following syntax:

aMatcher and exist
        ^

Attributes

Inherited from:
Matcher
infix def and(notWord: NotWord): AndNotWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and not contain value (3)
        ^

Attributes

Inherited from:
Matcher
infix def and(endWithWord: EndWithWord): AndEndWithWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and endWith regex (decimalRegex)
        ^

Attributes

Inherited from:
Matcher
infix def and(startWithWord: StartWithWord): AndStartWithWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and startWith regex ("1.7")
        ^

Attributes

Inherited from:
Matcher
infix def and(includeWord: IncludeWord): AndIncludeWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and include regex ("wor.d")
        ^

Attributes

Inherited from:
Matcher
infix def and(fullyMatchWord: FullyMatchWord): AndFullyMatchWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and fullyMatch regex (decimalRegex)
        ^

Attributes

Inherited from:
Matcher
infix def and(beWord: BeWord): AndBeWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and be a ('file)
        ^

Attributes

Inherited from:
Matcher
infix def and(containWord: ContainWord)(implicit prettifier: Prettifier, pos: Position): AndContainWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and contain key ("one")
        ^

Attributes

Inherited from:
Matcher
infix def and(haveWord: HaveWord): AndHaveWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher and have size (3 - 1)
        ^

Attributes

Inherited from:
Matcher
infix def and[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[String & U, TC1]

Returns a MatcherFactory whose matcher method returns a Matcher, which has apply method that returns a MatchResult that represents the logical-and of the results of the wrapped and the passed MatcherFactory applied to the same value.

Returns a MatcherFactory whose matcher method returns a Matcher, which has apply method that returns a MatchResult that represents the logical-and of the results of the wrapped and the passed MatcherFactory applied to the same value.

Value parameters

rightMatcherFactory1

the MatcherFactory to logical-and with this MatcherFactory

Attributes

Returns

a MatcherFactory that performs the logical-and of this and the passed MatcherFactory

Inherited from:
Matcher
infix def and[U <: String](rightMatcher: Matcher[U]): Matcher[U]

Returns a matcher whose apply method returns a MatchResult that represents the logical-and of the results of the wrapped and the passed matcher applied to the same value.

Returns a matcher whose apply method returns a MatchResult that represents the logical-and of the results of the wrapped and the passed matcher applied to the same value.

The reason and has an upper bound on its type parameter is so that the Matcher resulting from an invocation of and will have the correct type parameter. If you call and on a Matcher[Orange], passing in a Matcher[Valencia], the result will have type Matcher[Valencia]. This is correct because both a Matcher[Orange] and a Matcher[Valencia] know how to match a Valencia (but a Matcher[Valencia] doesn't know how to match any old Orange). If you call and on a Matcher[Orange], passing in a Matcher[Fruit], the result will have type Matcher[Orange]. This is also correct because both a Matcher[Orange] and a Matcher[Fruit] know how to match an Orange (but a Matcher[Orange] doesn't know how to match any old Fruit).

Value parameters

the

matcher to logical-and with this matcher

Attributes

Returns

a matcher that performs the logical-and of this and the passed matcher

Inherited from:
Matcher
def andThen[A](g: MatchResult => A): String => A

Attributes

Inherited from:
Function1
override def compose[U](g: U => String): Matcher[U]

Compose this matcher with the passed function, returning a new matcher.

Compose this matcher with the passed function, returning a new matcher.

This method overrides compose on Function1 to return a more specific function type of Matcher. For example, given a beOdd matcher defined like this:

val beOdd =
 new Matcher[Int] {
   def apply(left: Int) =
     MatchResult(
       left % 2 == 1,
       left + " was not odd",
       left + " was odd"
     )
 }

You could use beOdd like this:

3 should beOdd
4 should not (beOdd)

If for some odd reason, you wanted a Matcher[String] that checked whether a string, when converted to an Int, was odd, you could make one by composing beOdd with a function that converts a string to an Int, like this:

val beOddAsInt = beOdd compose { (s: String) => s.toInt }

Now you have a Matcher[String] whose apply method first invokes the converter function to convert the passed string to an Int, then passes the resulting Int to beOdd. Thus, you could use beOddAsInt like this:

"3" should beOddAsInt
"4" should not (beOddAsInt)

Attributes

Definition Classes
Matcher -> Function1
Inherited from:
Matcher
def mapArgs(prettify: Any => String): Matcher[String]

Creates a new Matcher that will produce MatchResults that contain error messages constructed using arguments that are transformed by the passed prettify function. In other words, the MatchResult produced by this Matcher will use arguments transformed by prettify function to construct the final error messages.

Creates a new Matcher that will produce MatchResults that contain error messages constructed using arguments that are transformed by the passed prettify function. In other words, the MatchResult produced by this Matcher will use arguments transformed by prettify function to construct the final error messages.

Value parameters

prettify

a function with which to transform the arguments of error messages.

Attributes

Returns

a new Matcher that will produce MatchResults that contain error messages constructed using arguments transformed by the passed prettify function.

Inherited from:
Matcher
def mapResult(prettify: MatchResult => MatchResult): Matcher[String]

Creates a new Matcher that will produce MatchResults by applying the original MatchResult produced by this Matcher to the passed prettify function. In other words, the MatchResult produced by this Matcher will be passed to prettify to produce the final MatchResult

Creates a new Matcher that will produce MatchResults by applying the original MatchResult produced by this Matcher to the passed prettify function. In other words, the MatchResult produced by this Matcher will be passed to prettify to produce the final MatchResult

Value parameters

prettify

a function to apply to the original MatchResult produced by this Matcher

Attributes

Returns

a new Matcher that will produce MatchResults by applying the original MatchResult produced by this Matcher to the passed prettify function

Inherited from:
Matcher
infix def or(notExist: ResultOfNotExist): MatcherFactory1[String, Existence]

This method enables the following syntax:

This method enables the following syntax:

aMatcher or not (exist)
        ^

Attributes

Inherited from:
Matcher
infix def or(existWord: ExistWord): MatcherFactory1[String, Existence]

This method enables the following syntax:

This method enables the following syntax:

aMatcher or exist
        ^

Attributes

Inherited from:
Matcher
infix def or(notWord: NotWord): OrNotWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or not contain value (3)
        ^

Attributes

Inherited from:
Matcher
infix def or(endWithWord: EndWithWord): OrEndWithWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or endWith regex ("7b")
        ^

Attributes

Inherited from:
Matcher
infix def or(startWithWord: StartWithWord): OrStartWithWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or startWith regex ("1.7")
        ^

Attributes

Inherited from:
Matcher
infix def or(includeWord: IncludeWord): OrIncludeWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or include regex ("1.7")
        ^

Attributes

Inherited from:
Matcher
infix def or(fullyMatchWord: FullyMatchWord): OrFullyMatchWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or fullyMatch regex (decimal)
        ^

Attributes

Inherited from:
Matcher
infix def or(beWord: BeWord): OrBeWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or be a ('directory)
        ^

Attributes

Inherited from:
Matcher
infix def or(containWord: ContainWord)(implicit prettifier: Prettifier, pos: Position): OrContainWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or contain value (1)
        ^

Attributes

Inherited from:
Matcher
infix def or(haveWord: HaveWord): OrHaveWord

This method enables the following syntax:

This method enables the following syntax:

aMatcher or have size (3 - 1)
        ^

Attributes

Inherited from:
Matcher
infix def or[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[String & U, TC1]

Returns a MatcherFactory whose matcher method returns a Matcher, which has apply method that returns a MatchResult that represents the logical-or of the results of the wrapped and the passed MatcherFactory applied to the same value.

Returns a MatcherFactory whose matcher method returns a Matcher, which has apply method that returns a MatchResult that represents the logical-or of the results of the wrapped and the passed MatcherFactory applied to the same value.

Value parameters

rightMatcherFactory1

the MatcherFactory to logical-or with this MatcherFactory

Attributes

Returns

a MatcherFactory that performs the logical-or of this and the passed MatcherFactory

Inherited from:
Matcher
infix def or[U <: String](rightMatcher: Matcher[U]): Matcher[U]

Returns a matcher whose apply method returns a MatchResult that represents the logical-or of the results of this and the passed matcher applied to the same value.

Returns a matcher whose apply method returns a MatchResult that represents the logical-or of the results of this and the passed matcher applied to the same value.

The reason or has an upper bound on its type parameter is so that the Matcher resulting from an invocation of or will have the correct type parameter. If you call or on a Matcher[Orange], passing in a Matcher[Valencia], the result will have type Matcher[Valencia]. This is correct because both a Matcher[Orange] and a Matcher[Valencia] know how to match a Valencia (but a Matcher[Valencia] doesn't know how to match any old Orange). If you call or on a Matcher[Orange], passing in a Matcher[Fruit], the result will have type Matcher[Orange]. This is also correct because both a Matcher[Orange] and a Matcher[Fruit] know how to match an Orange (but a Matcher[Orange] doesn't know how to match any old Fruit).

Value parameters

rightMatcher

the matcher to logical-or with this matcher

Attributes

Returns

a matcher that performs the logical-or of this and the passed matcher

Inherited from:
Matcher
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1