org.scalatest.matchers.MatcherFactory5.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalatest_2.11.0-RC2 Show documentation
Show all versions of scalatest_2.11.0-RC2 Show documentation
ScalaTest is a free, open-source testing toolkit for Scala and Java
programmers.
The newest version!
package org.scalatest.matchers
import org.scalatest.enablers._
import org.scalatest.MatchersHelper.andMatchersAndApply
import org.scalatest.MatchersHelper.orMatchersAndApply
import org.scalatest.words.MatcherWords
import scala.collection.GenTraversable
import scala.util.matching.Regex
import org.scalautils.Equality
import org.scalautils.TripleEqualsSupport.Spread
import org.scalautils.TripleEqualsSupport.TripleEqualsInvocation
import org.scalautils.Prettifier
import org.scalatest.FailureMessages
import org.scalatest.Resources
import org.scalatest.words.FullyMatchWord
import org.scalatest.words.StartWithWord
import org.scalatest.words.EndWithWord
import org.scalatest.words.IncludeWord
import org.scalatest.words.HaveWord
import org.scalatest.words.BeWord
import org.scalatest.words.NotWord
import org.scalatest.words.ContainWord
import org.scalatest.words.ResultOfLengthWordApplication
import org.scalatest.words.ResultOfSizeWordApplication
import org.scalatest.words.ResultOfMessageWordApplication
import org.scalatest.words.ResultOfLessThanComparison
import org.scalatest.words.ResultOfGreaterThanComparison
import org.scalatest.words.ResultOfLessThanOrEqualToComparison
import org.scalatest.words.ResultOfGreaterThanOrEqualToComparison
import org.scalatest.words.ResultOfAWordToSymbolApplication
import org.scalatest.words.ResultOfAWordToBePropertyMatcherApplication
import org.scalatest.words.ResultOfAWordToAMatcherApplication
import org.scalatest.words.ResultOfAnWordToSymbolApplication
import org.scalatest.words.ResultOfAnWordToBePropertyMatcherApplication
import org.scalatest.words.ResultOfAnWordToAnMatcherApplication
import org.scalatest.words.ResultOfTheSameInstanceAsApplication
import org.scalatest.words.ResultOfRegexWordApplication
import org.scalatest.words.ResultOfKeyWordApplication
import org.scalatest.words.ResultOfValueWordApplication
import org.scalatest.words.RegexWithGroups
import org.scalatest.words.ResultOfDefinedAt
import org.scalatest.words.ResultOfOneOfApplication
import org.scalatest.words.ResultOfAtLeastOneOfApplication
import org.scalatest.words.ResultOfNoneOfApplication
import org.scalatest.words.ResultOfTheSameElementsAsApplication
import org.scalatest.words.ResultOfTheSameElementsInOrderAsApplication
import org.scalatest.words.ResultOfOnlyApplication
import org.scalatest.words.ResultOfAllOfApplication
import org.scalatest.words.ResultOfInOrderOnlyApplication
import org.scalatest.words.ResultOfInOrderApplication
import org.scalatest.words.ResultOfAtMostOneOfApplication
import org.scalatest.words.SortedWord
import org.scalatest.words.ResultOfATypeInvocation
import org.scalatest.words.ResultOfAnTypeInvocation
import org.scalatest.words.ExistWord
import org.scalatest.words.ResultOfNotExist
import org.scalatest.words.ReadableWord
import org.scalatest.words.WritableWord
import org.scalatest.words.EmptyWord
import org.scalatest.words.DefinedWord
import scala.language.higherKinds
/**
* A matcher factory that can produce a matcher given five typeclass instances.
*
*
* In the type parameters for this class, "SC
" means superclass; "TC
"
* (in TC1
, TC2
, etc.) means typeclass.
* This class's matcher
factory method will produce a Matcher[T]
, where T
is a subtype of (or the same type
* as) SC
, given a typeclass instance for each TCn
* implicit parameter (for example, a TC1[T]
, TC2[T]
, etc.).
*
*
* @author Bill Venners
*/
// Add a TYPECLASSN for each N
abstract class MatcherFactory5[-SC, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]] { thisMatcherFactory =>
/**
* Factory method that will produce a Matcher[T]
, where T
is a subtype of (or the same type
* as) SC
, given a typeclass instance for each TCn
* implicit parameter (for example, a TC1[T]
, TC2[T]
, etc.).
*/
def matcher[T <: SC : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[T]
/**
* Ands this matcher factory with the passed matcher.
*/
def and[U <: SC](rightMatcher: Matcher[U]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] =
new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
andMatchersAndApply(left, leftMatcher, rightMatcher)
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcher) + ")"
}
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcher) + ")"
}
/**
* Ors this matcher factory with the passed matcher.
*/
def or[U <: SC](rightMatcher: Matcher[U]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] =
new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
orMatchersAndApply(left, leftMatcher, rightMatcher)
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcher) + ")"
}
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcher) + ")"
}
/**
* Ands this matcher factory with the passed MatcherFactory1
that has the same final typeclass as this one.
*/
def and[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC5]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] =
new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
andMatchersAndApply(left, leftMatcher, rightMatcher)
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcherFactory) + ")"
}
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcherFactory) + ")"
}
/**
* Ors this matcher factory with the passed MatcherFactory1
that has the same final typeclass as this one.
*/
def or[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC5]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] =
new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
orMatchersAndApply(left, leftMatcher, rightMatcher)
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcherFactory) + ")"
}
}
override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcherFactory) + ")"
}
/**
* Ands this matcher factory with the passed matcher factory.
*/
def and[U <: SC, TC6[_]](rightMatcherFactory: MatcherFactory1[U, TC6]): MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] =
new MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
andMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ors this matcher factory with the passed matcher factory.
*/
def or[U <: SC, TC6[_]](rightMatcherFactory: MatcherFactory1[U, TC6]): MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] =
new MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
orMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ands this matcher factory with the passed matcher factory.
*/
def and[U <: SC, TC6[_], TC7[_]](rightMatcherFactory: MatcherFactory2[U, TC6, TC7]): MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] =
new MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
andMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ors this matcher factory with the passed matcher factory.
*/
def or[U <: SC, TC6[_], TC7[_]](rightMatcherFactory: MatcherFactory2[U, TC6, TC7]): MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] =
new MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
orMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ands this matcher factory with the passed matcher factory.
*/
def and[U <: SC, TC6[_], TC7[_], TC8[_]](rightMatcherFactory: MatcherFactory3[U, TC6, TC7, TC8]): MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] =
new MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
andMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ors this matcher factory with the passed matcher factory.
*/
def or[U <: SC, TC6[_], TC7[_], TC8[_]](rightMatcherFactory: MatcherFactory3[U, TC6, TC7, TC8]): MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] =
new MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
orMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ands this matcher factory with the passed matcher factory.
*/
def and[U <: SC, TC6[_], TC7[_], TC8[_], TC9[_]](rightMatcherFactory: MatcherFactory4[U, TC6, TC7, TC8, TC9]): MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] =
new MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8 : TC9]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
andMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* Ors this matcher factory with the passed matcher factory.
*/
def or[U <: SC, TC6[_], TC7[_], TC8[_], TC9[_]](rightMatcherFactory: MatcherFactory4[U, TC6, TC7, TC8, TC9]): MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] =
new MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] {
def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8 : TC9]: Matcher[V] = {
new Matcher[V] {
def apply(left: V): MatchResult = {
val leftMatcher = thisMatcherFactory.matcher
val rightMatcher = rightMatcherFactory.matcher
orMatchersAndApply(left, leftMatcher, rightMatcher)
}
}
}
}
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndHaveWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and have length (3 - 1)
* ^
*
*/
def length(expectedLength: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] = and(MatcherWords.have.length(expectedLength))
// These guys need to generate a MatcherFactory of N+1. And it needs N-1 TC's, with the last one being Length.
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and have size (3 - 1)
* ^
*
*/
def size(expectedSize: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] = and(MatcherWords.have.size(expectedSize))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and have message ("A message from Mars!")
* ^
*
*/
def message(expectedMessage: String): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] = and(MatcherWords.have.message(expectedMessage))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and have size (3 - 1)
* ^
*
*/
def and(haveWord: HaveWord): AndHaveWord = new AndHaveWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndContainWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain (3 - 1)
* ^
*
*/
def apply(expectedElement: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.contain(expectedElement))
// And some, the ones that would by themselves already generate a Matcher, just return a MatcherFactoryN where N is the same.
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain key ("one")
* ^
*
*/
def key(expectedKey: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] = thisMatcherFactory.and(MatcherWords.contain.key(expectedKey))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain value (1)
* ^
*
*/
def value(expectedValue: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] = thisMatcherFactory.and(MatcherWords.contain.value(expectedValue))
// And some, the ones that would by themselves already generate a Matcher, just return a MatcherFactoryN where N is the same.
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain theSameElementsAs List(1, 2, 3)
* ^
*
*/
def theSameElementsAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.contain.theSameElementsAs(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain theSameElementsInOrderAs List(1, 2, 3)
* ^
*
*/
def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.and(MatcherWords.contain.theSameElementsInOrderAs(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain inOrderOnly (1, 2, 3)
* ^
*
*/
def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.and(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain allOf (1, 2, 3)
* ^
*
*/
def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles .toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain inOrder (1, 2, 3)
* ^
*
*/
def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.and(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain oneOf (1, 2, 3)
* ^
*
*/
def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.and(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain atLeastOneOf (1, 2, 3)
* ^
*
*/
def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain only (1, 2, 3)
* ^
*
*/
def only(right: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.contain.only(right.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain noneOf (1, 2, 3)
* ^
*
*/
def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.and(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain atMostOneOf (1, 2, 3)
* ^
*
*/
def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and contain key ("one")
* ^
*
*/
def and(containWord: ContainWord): AndContainWord = new AndContainWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndBeWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and be a ('file)
* ^
*
*/
def a(symbol: Symbol): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.a(symbol))
/**
* This method enables the following syntax given a MatcherFactory5
, where file
is a BePropertyMatcher
:
*
*
* aMatcherFactory and be a (file)
* ^
*
*/
def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.a(bePropertyMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
, where validNumber
is an AMatcher
:
*
*
* aMatcherFactory and be a (validNumber)
* ^
*
*/
def a[U](aMatcher: AMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.a(aMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and be an ('apple)
* ^
*
*/
def an(symbol: Symbol): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.an(symbol))
/**
* This method enables the following syntax given a MatcherFactory5
, where apple
is a BePropertyMatcher
:
*
*
* aMatcherFactory and be an (apple)
* ^
*
*/
def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.an(bePropertyMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
, where integerNumber
is an AnMatcher
:
*
*
* aMatcherFactory and be an (integerNumber)
* ^
*
*/
def an[U](anMatcher: AnMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.an(anMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and be theSameInstanceAs (string)
* ^
*
*/
def theSameInstanceAs(anyRef: AnyRef): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.theSameInstanceAs(anyRef))
/**
* This method enables the following syntax, where fraction
refers to a PartialFunction
:
*
*
* aMatcherFactory and be definedAt (8)
* ^
*
*/
def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.definedAt(right))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and be a ('file)
* ^
*
*/
def and(beWord: BeWord): AndBeWord = new AndBeWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndFullyMatchWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and fullyMatch regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.fullyMatch.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and fullyMatch regex (("a(b*)c" withGroup "bb"))
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.fullyMatch.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and fullyMatch regex (decimalRegex)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.fullyMatch.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and fullyMatch regex (decimalRegex)
* ^
*
*/
def and(fullyMatchWord: FullyMatchWord): AndFullyMatchWord = new AndFullyMatchWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndIncludeWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and include regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.include.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and include regex ("a(b*)c" withGroup "bb")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.include.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and include regex (decimalRegex)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.include.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and include regex ("wor.d")
* ^
*
*/
def and(includeWord: IncludeWord): AndIncludeWord = new AndIncludeWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndStartWithWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and startWith regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.startWith.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and startWith regex ("a(b*)c" withGroup "bb")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.startWith.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and startWith regex (decimalRegex)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.startWith.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and startWith regex ("1.7")
* ^
*
*/
def and(startWithWord: StartWithWord): AndStartWithWord = new AndStartWithWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndEndWithWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and endWith regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.endWith.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and endWith regex ("a(b*)c" withGroup "bb")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.endWith.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and endWith regex (decimalRegex)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.endWith.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and endWith regex (decimalRegex)
* ^
*
*/
def and(endWithWord: EndWithWord): AndEndWithWord = new AndEndWithWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class AndNotWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not equal (3 - 1)
* ^
*
*/
def equal(any: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Equality] =
thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.equal(any)))
/**
* This method enables the following syntax, for the "primitive" numeric types:
*
*
* aMatcherFactory and not equal (17.0 +- 0.2)
* ^
*
*/
def equal[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.equal(spread))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not equal (null)
* ^
*
*/
def equal(o: Null): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = {
thisMatcherFactory and {
new Matcher[SC] {
def apply(left: SC): MatchResult = {
MatchResult(
left != null,
Resources("equaledNull"),
Resources("didNotEqualNull"),
Resources("midSentenceEqualedNull"),
Resources("didNotEqualNull"),
Vector.empty,
Vector(left)
)
}
override def toString: String = "not equal null"
}
}
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be (3 - 1)
* ^
*
*/
def be(any: Any): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.be(any)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not have length (3)
* ^
*
*/
def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] =
thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not have size (3)
* ^
*
*/
def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] =
thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not have message ("Message from Mars!")
* ^
*
*/
def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] =
thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not have (author ("Melville"))
* ^
*
*/
def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be < (6)
* ^
*
*/
def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.be(resultOfLessThanComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be (null)
* ^
*
*/
def be(o: Null): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(o))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory (8) and not be > (6)
* ^
*
*/
def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.be(resultOfGreaterThanComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be <= (2)
* ^
*
*/
def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.be(resultOfLessThanOrEqualToComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be >= (6)
* ^
*
*/
def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be === (6)
* ^
*
*/
def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.be(tripleEqualsInvocation))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be ('empty)
* ^
*
*/
def be(symbol: Symbol): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(symbol))
/**
* This method enables the following syntax given a MatcherFactory5
, where odd
is a BeMatcher
:
*
*
* aMatcherFactory and not be (odd)
* ^
*
*/
def be[U](beMatcher: BeMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(beMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
, where directory
is a BePropertyMatcher
:
*
*
* aMatcherFactory and not be (directory)
* ^
*
*/
def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(bePropertyMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be a ('file)
* ^
*
*/
def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where validMarks
is an AMatcher
:
*
*
* aMatcherFactory and not be a (validMarks)
* ^
*
*/
def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where directory
is a BePropertyMatcher
:
*
*
* aMatcherFactory and not be a (directory)
* ^
*
*/
def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be a primeNumber
* ^
*
*/
def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where apple
is a BePropertyMatcher
:
*
*
* aMatcherFactory and not be an (apple)
* ^
*
*/
def be[SC <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[SC]) = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where invalidMarks
is a AnMatcher
:
*
*
* aMatcherFactory and not be an (invalidMarks)
* ^
*
*/
def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be a [Book]
* ^
*
*/
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(aType))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be an [Apple]
* ^
*
*/
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(anType))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not be theSameInstanceAs (otherString)
* ^
*
*/
def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfTheSameInstanceAsApplication))
/**
* This method enables the following syntax, for the "primitive" numeric types:
*
*
* aMatcherFactory and not be (17.0 +- 0.2)
* ^
*
*/
def be[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(spread))
/**
* This method enables the following syntax, where fraction
is a PartialFunction
:
*
*
* aMatcherFactory and not be definedAt (8)
* ^
*
*/
def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.be(resultOfDefinedAt))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and not be sorted
* ^
*
*/
def be(sortedWord: SortedWord) =
thisMatcherFactory.and(MatcherWords.not.be(sortedWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and not be readable
* ^
*
*/
def be(readableWord: ReadableWord) =
thisMatcherFactory.and(MatcherWords.not.be(readableWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and not be writable
* ^
*
*/
def be(writableWord: WritableWord) =
thisMatcherFactory.and(MatcherWords.not.be(writableWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and not be empty
* ^
*
*/
def be(emptyWord: EmptyWord) =
thisMatcherFactory.and(MatcherWords.not.be(emptyWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and not be defined
* ^
*
*/
def be(definedWord: DefinedWord) =
thisMatcherFactory.and(MatcherWords.not.be(definedWord))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not fullyMatch regex (decimal)
* ^
*
*/
def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.fullyMatch(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not include regex (decimal)
* ^
*
*/
def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.include(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not include ("1.7")
* ^
*
*/
def include(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.include(expectedSubstring))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not startWith regex (decimal)
* ^
*
*/
def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.startWith(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not startWith ("1.7")
* ^
*
*/
def startWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.startWith(expectedSubstring))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not endWith regex (decimal)
* ^
*
*/
def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.endWith(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not endWith ("1.7")
* ^
*
*/
def endWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.and(MatcherWords.not.endWith(expectedSubstring))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain (3)
* ^
*
*/
def contain[U](expectedElement: U): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.and(MatcherWords.not.contain(expectedElement))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain key ("three")
* ^
*
*/
def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] =
thisMatcherFactory.and(MatcherWords.not.contain(resultOfKeyWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain value (3)
* ^
*
*/
def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] =
thisMatcherFactory.and(MatcherWords.not.contain(resultOfValueWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain oneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain atLeastOneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain noneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfNoneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain theSameElementsAs (List(8, 1, 2))
* ^
*
*/
def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain theSameElementsInOrderAs (List(8, 1, 2))
* ^
*
*/
def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain only (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain inOrderOnly (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain allOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfAllOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain inOrder (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfInOrderApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain atMostOneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.and(MatcherWords.not.contain(right))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory and not contain value (3)
* ^
*
*/
def and(notWord: NotWord): AndNotWord = new AndNotWord
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and exist
* ^
*
*/
def and(existWord: ExistWord): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] =
thisMatcherFactory.and(MatcherWords.exist.matcherFactory)
/**
* This method enables the following syntax:
*
*
* aMatcherFactory and not (exist)
* ^
*
*/
def and(notExist: ResultOfNotExist): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] =
thisMatcherFactory.and(MatcherWords.not.exist)
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrHaveWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or have length (3 - 1)
* ^
*
*/
def length(expectedLength: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] = or(MatcherWords.have.length(expectedLength))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or have size (3 - 1)
* ^
*
*/
def size(expectedSize: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] = or(MatcherWords.have.size(expectedSize))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or have message ("Message from Mars!")
* ^
*
*/
def message(expectedMessage: String): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] = or(MatcherWords.have.message(expectedMessage))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or have size (3 - 1)
* ^
*
*/
def or(haveWord: HaveWord): OrHaveWord = new OrHaveWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrContainWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain (3 - 1)
* ^
*
*/
def apply(expectedElement: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.contain(expectedElement))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain key ("one")
* ^
*
*/
def key(expectedKey: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] = thisMatcherFactory.or(MatcherWords.contain.key(expectedKey))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain value (1)
* ^
*
*/
def value(expectedValue: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] = thisMatcherFactory.or(MatcherWords.contain.value(expectedValue))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain theSameElementsAs List(1, 2, 3)
* ^
*
*/
def theSameElementsAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.contain.theSameElementsAs(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain theSameElementsInOrderAs List(1, 2, 3)
* ^
*
*/
def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.or(MatcherWords.contain.theSameElementsInOrderAs(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain inOrderOnly (1, 2, 3)
* ^
*
*/
def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.or(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain allOf (1, 2, 3)
* ^
*
*/
def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain inOrder (1, 2, 3)
* ^
*
*/
def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.or(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain oneOf (1, 2, 3)
* ^
*
*/
def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.or(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain atLeastOneOf (1, 2, 3)
* ^
*
*/
def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain only (1, 2, 3)
* ^
*
*/
def only(right: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.contain.only(right.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain noneOf (1, 2, 3)
* ^
*
*/
def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.or(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or contain atMostOneOf (1, 2, 3)
* ^
*
*/
def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* (aMatcherFactory or contain value (1))
* ^
*
*/
def or(containWord: ContainWord): OrContainWord = new OrContainWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrBeWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or be a ('directory)
* ^
*
*/
def a(symbol: Symbol): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.a(symbol))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or be a (directory)
* ^
*
*/
def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.a(bePropertyMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or be a (validNumber)
* ^
*
*/
def a[U](aMatcher: AMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.a(aMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or be an ('apple)
* ^
*
*/
def an(symbol: Symbol): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.an(symbol))
/**
* This method enables the following syntax given a MatcherFactory5
, where apple
is a BePropertyMatcher
:
*
*
* aMatcherFactory or be an (apple)
* ^
*
*/
def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.an(bePropertyMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
, where integerNumber
is a AnMatcher
:
*
*
* aMatcherFactory or be an (integerNumber)
* ^
*
*/
def an[U](anMatcher: AnMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.an(anMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or be theSameInstanceAs (otherString)
* ^
*
*/
def theSameInstanceAs(anyRef: AnyRef): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.theSameInstanceAs(anyRef))
/**
* This method enables the following syntax, where fraction
refers to a PartialFunction
:
*
*
* aMatcherFactory or be definedAt (8)
* ^
*
*/
def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.definedAt(right))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or be a ('directory)
* ^
*
*/
def or(beWord: BeWord): OrBeWord = new OrBeWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrFullyMatchWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or fullyMatch regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.fullyMatch.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or fullyMatch regex ("a(b*)c" withGroup "bb")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.fullyMatch.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or fullyMatch regex (decimal)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.fullyMatch.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or fullyMatch regex (decimal)
* ^
*
*/
def or(fullyMatchWord: FullyMatchWord): OrFullyMatchWord = new OrFullyMatchWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrIncludeWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or include regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.include.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or include regex ("a(b*)c" withGroup "bb")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.include.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or include regex (decimal)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.include.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or include regex ("1.7")
* ^
*
*/
def or(includeWord: IncludeWord): OrIncludeWord = new OrIncludeWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrStartWithWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or startWith regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.startWith.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or startWith regex ("a(b*)c" withGroup "bb")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.startWith.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or startWith regex (decimal)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.startWith.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or startWith regex ("1.7")
* ^
*
*/
def or(startWithWord: StartWithWord): OrStartWithWord = new OrStartWithWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrEndWithWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or endWith regex (decimal)
* ^
*
*/
def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.endWith.regex(regexString))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or endWith regex ("d(e*)f" withGroup "ee")
* ^
*
*/
def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.endWith.regex(regexWithGroups))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or endWith regex (decimal)
* ^
*
*/
def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.endWith.regex(regex))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or endWith regex ("7b")
* ^
*
*/
def or(endWithWord: EndWithWord): OrEndWithWord = new OrEndWithWord
/**
* This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
* the matchers DSL.
*
* @author Bill Venners
*/
final class OrNotWord {
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not equal (3 - 1)
* ^
*
*/
def equal(any: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Equality] =
thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.equal(any)))
/**
* This method enables the following syntax for the "primitive" numeric types:
*
*
* aMatcherFactory or not equal (17.0 +- 0.2)
* ^
*
*/
def equal[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.equal(spread))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not equal (null)
* ^
*
*/
def equal(o: Null): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = {
thisMatcherFactory or {
new Matcher[SC] {
def apply(left: SC): MatchResult = {
MatchResult(
left != null,
Resources("equaledNull"),
Resources("didNotEqualNull"),
Resources("midSentenceEqualedNull"),
Resources("didNotEqualNull"),
Vector.empty,
Vector(left)
)
}
override def toString: String = "not equal null"
}
}
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be (2)
* ^
*
*/
def be(any: Any): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.be(any)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not have length (3)
* ^
*
*/
def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] =
thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not have size (3)
* ^
*
*/
def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] =
thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not have message ("Message from Mars!")
* ^
*
*/
def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] =
thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not have (author ("Melville"))
* ^
*
*/
def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*)))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be (null)
* ^
*
*/
def be(o: Null): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(o))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be < (8)
* ^
*
*/
def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.be(resultOfLessThanComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be > (6)
* ^
*
*/
def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.be(resultOfGreaterThanComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be <= (2)
* ^
*
*/
def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.be(resultOfLessThanOrEqualToComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be >= (6)
* ^
*
*/
def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be === (8)
* ^
*
*/
def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.be(tripleEqualsInvocation))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be ('empty)
* ^
*
*/
def be(symbol: Symbol): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(symbol))
/**
* This method enables the following syntax given a MatcherFactory5
, where odd
is a BeMatcher
:
*
*
* aMatcherFactory or not be (odd)
* ^
*
*/
def be[U](beMatcher: BeMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(beMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
, where file
is a BePropertyMatcher
:
*
*
* aMatcherFactory or not be (file)
* ^
*
*/
def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(bePropertyMatcher))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be a ('file)
* ^
*
*/
def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where validMarks
is an AMatcher
:
*
*
* aMatcherFactory or not be a (validMarks)
* ^
*
*/
def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where file
is a BePropertyMatcher
:
*
*
* aMatcherFactory or not be a (file)
* ^
*
*/
def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be an ('apple)
* ^
*
*/
def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where apple
is a BePropertyMatcher
:
*
*
* aMatcherFactory or not be an (apple)
* ^
*
*/
def be[U <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
, where invalidMarks
is an AnMatcher
:
*
*
* aMatcherFactory and not be an (invalidMarks)
* ^
*
*/
def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be a [Book]
* ^
*
*/
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(aType))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be an [Apple]
* ^
*
*/
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(anType))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not be theSameInstanceAs (string)
* ^
*
*/
def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfTheSameInstanceAsApplication))
/**
* This method enables the following syntax for the "primitive" numeric types:
*
*
* aMatcherFactory or not be (17.0 +- 0.2)
* ^
*
*/
def be[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(spread))
/**
* This method enables the following syntax, where fraction
is a PartialFunction
:
*
*
* aMatcherFactory or not be definedAt (8)
* ^
*
*/
def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.be(resultOfDefinedAt))
/**
* This method enables the following syntax, where fraction
is a PartialFunction
:
*
*
* aMatcherFactory or not be sorted
* ^
*
*/
def be(sortedWord: SortedWord) =
thisMatcherFactory.or(MatcherWords.not.be(sortedWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory or not be readable
* ^
*
*/
def be(readableWord: ReadableWord) =
thisMatcherFactory.or(MatcherWords.not.be(readableWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory or not be writable
* ^
*
*/
def be(writableWord: WritableWord) =
thisMatcherFactory.or(MatcherWords.not.be(writableWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory or not be empty
* ^
*
*/
def be(emptyWord: EmptyWord) =
thisMatcherFactory.or(MatcherWords.not.be(emptyWord))
/**
* This method enables the following syntax:
*
*
* aMatcherFactory or not be defined
* ^
*
*/
def be(definedWord: DefinedWord) =
thisMatcherFactory.or(MatcherWords.not.be(definedWord))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not fullyMatch regex (decimal)
* ^
*
*/
def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.fullyMatch(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not include regex (decimal)
* ^
*
*/
def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.include(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not include ("1.7")
* ^
*
*/
def include(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.include(expectedSubstring))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not startWith regex (decimal)
* ^
*
*/
def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.startWith(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not startWith ("1.7")
* ^
*
*/
def startWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.startWith(expectedSubstring))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not endWith regex (decimal)
* ^
*
*/
def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.endWith(resultOfRegexWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not endWith ("1.7")
* ^
*
*/
def endWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] =
thisMatcherFactory.or(MatcherWords.not.endWith(expectedSubstring))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain (3)
* ^
*
*/
def contain[U](expectedElement: U): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.or(MatcherWords.not.contain(expectedElement))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain key ("three")
* ^
*
*/
def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] =
thisMatcherFactory.or(MatcherWords.not.contain(resultOfKeyWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain value (3)
* ^
*
*/
def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] =
thisMatcherFactory.or(MatcherWords.not.contain(resultOfValueWordApplication))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain oneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain atLeastOneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain noneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfNoneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain theSameElementsAs (List(8, 1, 2))
* ^
*
*/
def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain theSameElementsInOrderAs (List(8, 1, 2))
* ^
*
*/
def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain only (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain inOrderOnly (8, 1, 2))
* ^
*
*/
def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain allOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfAllOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain inOrder (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfInOrderApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain atMostOneOf (8, 1, 2)
* ^
*
*/
def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] =
thisMatcherFactory.or(MatcherWords.not.contain(right))
}
/**
* This method enables the following syntax given a MatcherFactory5
:
*
*
* aMatcherFactory or not contain value (3)
* ^
*
*/
def or(notWord: NotWord): OrNotWord = new OrNotWord
/**
* This method enables the following syntax:
*
*
* aMatcherFactory or exist
* ^
*
*/
def or(existWord: ExistWord): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] =
thisMatcherFactory.or(MatcherWords.exist.matcherFactory)
/**
* This method enables the following syntax:
*
*
* aMatcherFactory or not (exist)
* ^
*
*/
def or(notExist: ResultOfNotExist): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] =
thisMatcherFactory.or(MatcherWords.not.exist)
}
/**
* Companion object containing an implicit method that converts a MatcherFactory5
to a Matcher
.
*
* @author Bill Venners
*/
object MatcherFactory5 {
import scala.language.implicitConversions
/**
* Converts a MatcherFactory5
to a Matcher
.
*
* @param matcherFactory a MatcherFactory5 to convert
* @return a Matcher produced by the passed MatcherFactory5
*/
implicit def produceMatcher[SC, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_], T <: SC : TC1 : TC2 : TC3 : TC4 : TC5](matcherFactory: MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5]): Matcher[T] =
matcherFactory.matcher
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy