Class AbstractCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- java.lang.Object
-
- io.github.henryssondaniel.teacup.core.assertion.AbstractObjectAssert<T,U>
-
- io.github.henryssondaniel.teacup.core.assertion.AbstractCharSequenceAssert<T,U>
-
- Type Parameters:
T
- the char sequence typeU
- the generic char sequence assert type
- All Implemented Interfaces:
EnumerableAssert<T,U>
,GenericCharSequenceAssert<T,U>
,GenericObjectAssert<T,U>
- Direct Known Subclasses:
AbstractStringAssert
public abstract class AbstractCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>> extends AbstractObjectAssert<T,U> implements GenericCharSequenceAssert<T,U>
Abstract char sequence assert.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description AbstractCharSequenceAssert()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description U
contains(java.lang.CharSequence... values)
Verifies that the CharSequence contains the values.U
containsIgnoringCase(java.lang.CharSequence value)
Verifies that the CharSequence contains the value, ignoring case considerations.U
containsOnlyOnce(java.lang.CharSequence value)
Verifies that the CharSequence contains the value, only once.U
containsPattern(java.lang.CharSequence regex)
Verifies that the CharSequence contains the regular expression.U
containsSequence(java.lang.CharSequence... values)
Verifies that the CharSequence contains the values, in the given order without any other values between them.U
containsSubsequence(java.lang.CharSequence... values)
Verifies that the CharSequence contains the values, in the given order, possibly with other values between them.U
doesNotContain(java.lang.CharSequence... values)
Verifies that the CharSequence does not contain the values.U
doesNotContainPattern(java.lang.CharSequence regex)
Verifies that the CharSequence does not contain the regular expression.U
doesNotEndWith(java.lang.CharSequence value)
Verifies that the CharSequence does not end with the value.U
doesNotMatch(java.lang.CharSequence regex)
Verifies that the CharSequence does not verify the regular expression.U
doesNotStartWith(java.lang.CharSequence value)
Verifies that the CharSequence does not start with the value.U
endsWith(java.lang.CharSequence value)
Verifies that the CharSequence ends with the value.U
hasSameSizeAs(java.lang.CharSequence value)
Verifies that the CharSequence has the same size as the value.U
hasSameSizeAs(java.lang.Iterable<?> other)
Verifies that the enumerable has the same size as the other.U
hasSameSizeAs(java.lang.Object array)
Verifies that the enumerable has the same size as the array.U
hasSize(int expected)
Verifies that the enumerable has the expected size.U
isEmpty()
Verifies that the enumerable is empty.U
isEqualToIgnoringCase(java.lang.CharSequence value)
Verifies that the CharSequence is equal to the value, ignoring case.U
isEqualToIgnoringNewLines(java.lang.CharSequence value)
Verifies that the CharSequence is equal to the value, ignoring new lines.U
isEqualToIgnoringWhitespace(java.lang.CharSequence value)
Verifies that the CharSequence is equal to the value, ignoring whitespace.U
isEqualToNormalizingNewlines(java.lang.CharSequence value)
Verifies that the CharSequence is equal to the value, normalizing new lines.U
isEqualToNormalizingWhitespace(java.lang.CharSequence value)
Verifies that the CharSequence is equal to the value, normalizing whitespace.U
isNotEmpty()
Verifies that the enumerable is not empty.U
isNotEqualToIgnoringCase(java.lang.CharSequence value)
Verifies that the CharSequence is not equal to the value, ignoring case.U
isNotEqualToIgnoringWhitespace(java.lang.CharSequence value)
Verifies that the CharSequence is not equal to the value, ignoring whitespace.U
isNotEqualToNormalizingWhitespace(java.lang.CharSequence value)
Verifies that the CharSequence is not equal to the value, normalizing whitespace.U
isNullOrEmpty()
Verifies that the enumerable is null or empty.U
isSubstringOf(java.lang.CharSequence value)
Verifies that the CharSequence is a substring of the value.U
isXmlEqualTo(java.lang.CharSequence xml)
Verifies that the CharSequence is equal to the given XML after both have been formatted the same way.U
matches(java.lang.CharSequence regex)
Verifies that the CharSequence matches the regular expression.U
startsWith(java.lang.CharSequence value)
Verifies that the CharSequence starts with the value.-
Methods inherited from class io.github.henryssondaniel.teacup.core.assertion.AbstractObjectAssert
doesNotHaveSameClassAs, hasSameClassAs, isEqualTo, isNotEqualTo, isNotSameAs, isSameAs, verify
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.henryssondaniel.teacup.core.assertion.EnumerableAssert
hasSameSizeAs, hasSameSizeAs, hasSize, isEmpty, isNotEmpty, isNullOrEmpty
-
Methods inherited from interface io.github.henryssondaniel.teacup.core.assertion.GenericObjectAssert
doesNotHaveSameClassAs, hasSameClassAs, isEqualTo, isNotEqualTo, isNotSameAs, isSameAs, verify
-
-
-
-
Method Detail
-
contains
public U contains(java.lang.CharSequence... values)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence contains the values.- Specified by:
contains
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
values
- the values- Returns:
- the char sequence assert
-
containsIgnoringCase
public U containsIgnoringCase(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence contains the value, ignoring case considerations.- Specified by:
containsIgnoringCase
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
containsOnlyOnce
public U containsOnlyOnce(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence contains the value, only once.- Specified by:
containsOnlyOnce
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
containsPattern
public U containsPattern(java.lang.CharSequence regex)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence contains the regular expression.- Specified by:
containsPattern
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
regex
- the regex- Returns:
- the char sequence assert
-
containsSequence
public U containsSequence(java.lang.CharSequence... values)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence contains the values, in the given order without any other values between them.- Specified by:
containsSequence
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
values
- the values- Returns:
- the char sequence assert
-
containsSubsequence
public U containsSubsequence(java.lang.CharSequence... values)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence contains the values, in the given order, possibly with other values between them.- Specified by:
containsSubsequence
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
values
- the values- Returns:
- the char sequence assert
-
doesNotContain
public U doesNotContain(java.lang.CharSequence... values)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence does not contain the values.- Specified by:
doesNotContain
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
values
- the values- Returns:
- the char sequence assert
-
doesNotContainPattern
public U doesNotContainPattern(java.lang.CharSequence regex)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence does not contain the regular expression.- Specified by:
doesNotContainPattern
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
regex
- the regex- Returns:
- the char sequence assert
-
doesNotEndWith
public U doesNotEndWith(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence does not end with the value.- Specified by:
doesNotEndWith
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
doesNotMatch
public U doesNotMatch(java.lang.CharSequence regex)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence does not verify the regular expression.- Specified by:
doesNotMatch
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
regex
- the regex- Returns:
- the char sequence assert
-
doesNotStartWith
public U doesNotStartWith(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence does not start with the value.- Specified by:
doesNotStartWith
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
endsWith
public U endsWith(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence ends with the value.- Specified by:
endsWith
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
hasSameSizeAs
public U hasSameSizeAs(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence has the same size as the value.- Specified by:
hasSameSizeAs
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isEqualToIgnoringCase
public U isEqualToIgnoringCase(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is equal to the value, ignoring case.- Specified by:
isEqualToIgnoringCase
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isEqualToIgnoringNewLines
public U isEqualToIgnoringNewLines(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is equal to the value, ignoring new lines.- Specified by:
isEqualToIgnoringNewLines
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isEqualToIgnoringWhitespace
public U isEqualToIgnoringWhitespace(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is equal to the value, ignoring whitespace.- Specified by:
isEqualToIgnoringWhitespace
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isEqualToNormalizingNewlines
public U isEqualToNormalizingNewlines(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is equal to the value, normalizing new lines.- Specified by:
isEqualToNormalizingNewlines
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isEqualToNormalizingWhitespace
public U isEqualToNormalizingWhitespace(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is equal to the value, normalizing whitespace.- Specified by:
isEqualToNormalizingWhitespace
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isNotEqualToIgnoringCase
public U isNotEqualToIgnoringCase(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is not equal to the value, ignoring case.- Specified by:
isNotEqualToIgnoringCase
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isNotEqualToIgnoringWhitespace
public U isNotEqualToIgnoringWhitespace(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is not equal to the value, ignoring whitespace.- Specified by:
isNotEqualToIgnoringWhitespace
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isNotEqualToNormalizingWhitespace
public U isNotEqualToNormalizingWhitespace(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is not equal to the value, normalizing whitespace.- Specified by:
isNotEqualToNormalizingWhitespace
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isSubstringOf
public U isSubstringOf(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is a substring of the value.- Specified by:
isSubstringOf
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
isXmlEqualTo
public U isXmlEqualTo(java.lang.CharSequence xml)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence is equal to the given XML after both have been formatted the same way.- Specified by:
isXmlEqualTo
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
xml
- the XML- Returns:
- the char sequence assert
-
matches
public U matches(java.lang.CharSequence regex)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence matches the regular expression.- Specified by:
matches
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
regex
- the regex- Returns:
- the char sequence assert
-
startsWith
public U startsWith(java.lang.CharSequence value)
Description copied from interface:GenericCharSequenceAssert
Verifies that the CharSequence starts with the value.- Specified by:
startsWith
in interfaceGenericCharSequenceAssert<T extends java.lang.CharSequence,U extends GenericCharSequenceAssert<T,U>>
- Parameters:
value
- the value- Returns:
- the char sequence assert
-
hasSameSizeAs
public U hasSameSizeAs(java.lang.Iterable<?> other)
Description copied from interface:EnumerableAssert
Verifies that the enumerable has the same size as the other.- Specified by:
hasSameSizeAs
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Parameters:
other
- the other- Returns:
- the enumerable assert
-
hasSameSizeAs
public U hasSameSizeAs(java.lang.Object array)
Description copied from interface:EnumerableAssert
Verifies that the enumerable has the same size as the array.- Specified by:
hasSameSizeAs
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Parameters:
array
- the other- Returns:
- the enumerable assert
-
hasSize
public U hasSize(int expected)
Description copied from interface:EnumerableAssert
Verifies that the enumerable has the expected size.- Specified by:
hasSize
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Parameters:
expected
- the array- Returns:
- the enumerable assert
-
isEmpty
public U isEmpty()
Description copied from interface:EnumerableAssert
Verifies that the enumerable is empty.- Specified by:
isEmpty
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Returns:
- the enumerable assert
-
isNotEmpty
public U isNotEmpty()
Description copied from interface:EnumerableAssert
Verifies that the enumerable is not empty.- Specified by:
isNotEmpty
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Returns:
- the enumerable assert
-
isNullOrEmpty
public U isNullOrEmpty()
Description copied from interface:EnumerableAssert
Verifies that the enumerable is null or empty.- Specified by:
isNullOrEmpty
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Returns:
- the enumerable assert
-
-