infix fun <T : CharSequence> Expect<T>.containsNot(o: o): NotCheckerStep<T, NotSearchBehaviour>
(source)Starts a sophisticated contains
assertion building process based on this Expect and already chooses a
NotCheckerStep.
expect("ABC") containsNot o value "X"
fails {
expect("ABC") containsNot o value "B"
}
o
- The filler object o.
Return
The newly created builder.
infix fun <T : CharSequence> Expect<T>.containsNot(expected: CharSequenceOrNumberOrChar): Expect<T>
(source)Expects that the subject of this
expectation (a CharSequence) does not contain expected's toString representation.
It is a shortcut for contains not value expected
.
Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed. This function expects CharSequenceOrNumberOrChar (which is a typealias for Any) for your convenience, so that you can mix String and Int for instance.
expect("ABC") notToContain "X"
expect("ABC") containsNot values("X", 'Y', 1)
fails {
expect("ABC") notToContain "B"
}
fails {
expect("ABC") containsNot values("B", "X")
}
Return
an Expect for the subject of this
expectation.
infix fun <T : CharSequence> Expect<T>.containsNot(values: Values<CharSequenceOrNumberOrChar>): Expect<T>
(source)Expects that the subject of this
expectation (a CharSequence) does not contain the toString representation
of the given values.
It is a shortcut for contains not the values(expected, *otherExpected)
.
Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed. This function expects CharSequenceOrNumberOrChar (which is a typealias for Any) for your convenience, so that you can mix String and Int for instance.
expect("ABC") notToContain "X"
expect("ABC") containsNot values("X", 'Y', 1)
fails {
expect("ABC") notToContain "B"
}
fails {
expect("ABC") containsNot values("B", "X")
}
values
- The values which should not be found -- use the function values(t, ...)
to create a Values.
Return
an Expect for the subject of this
expectation.
infix fun <E, T : Iterable<E>> Expect<T>.containsNot(expected: E): Expect<T>
(source)Expects that the subject of this
expectation (an Iterable) has at least one element and
that it does not contain the expected value.
It is a shortcut for containsNot o value expected
Return
an Expect for the subject of this
expectation.
infix fun <E, T : Iterable<E>> Expect<T>.containsNot(values: Values<E>): Expect<T>
(source)Expects that the subject of this
expectation (an Iterable) has at least one element and
that it does not contain the expected values.
It is a shortcut for containsNot o the values(...)
values
- The values which should not be contained within the Iterable
-- use the function values(t, ...)
to create a Values.
Return
an Expect for the subject of this
expectation.