Class AbstractTextAssert<SELF extends org.assertj.core.api.AbstractStringAssert<SELF>>
java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
org.assertj.core.api.AbstractCharSequenceAssert<SELF,String>
org.assertj.core.api.AbstractStringAssert<SELF>
io.spring.initializr.generator.test.io.AbstractTextAssert<SELF>
- Type Parameters:
SELF
- the type of the concrete assert implementations
- All Implemented Interfaces:
org.assertj.core.api.Assert<SELF,
,String> org.assertj.core.api.Descriptable<SELF>
,org.assertj.core.api.EnumerableAssert<SELF,
,Character> org.assertj.core.api.ExtensionPoints<SELF,
String>
- Direct Known Subclasses:
GradleBuildAssert
,GradleSettingsAssert
,MavenBuildAssert
,TextAssert
public abstract class AbstractTextAssert<SELF extends org.assertj.core.api.AbstractStringAssert<SELF>>
extends org.assertj.core.api.AbstractStringAssert<SELF>
Base class for text assertions.
- Author:
- Stephane Nicoll
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractTextAssert
(String actual, Class<?> selfType) protected
AbstractTextAssert
(Path textFile, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptioncontains
(org.springframework.core.io.Resource content) Assert this text contains the content defined by the specifiedResource
.containsExactly
(String... lines) Assert this text contains exactly the specified lines.hasSameContentAs
(org.springframework.core.io.Resource expected) Assert this text has the same content as the content defined by the specifiedResource
.org.assertj.core.api.ListAssert<String>
lines()
Return anassert
for the lines that constitute this text, to allow chaining of lines-specific assertions from this call.Methods inherited from class org.assertj.core.api.AbstractStringAssert
asBase64Decoded, asBoolean, asByte, asDouble, asFloat, asInt, asLong, asShort, bytes, bytes, bytes, decodedAsBase64, isBase64, isBetween, isEqualTo, isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isStrictlyBetween, usingComparator, usingComparator, usingDefaultComparator
Methods inherited from class org.assertj.core.api.AbstractCharSequenceAssert
contains, contains, containsAnyOf, containsIgnoringCase, containsIgnoringNewLines, containsIgnoringWhitespaces, containsOnlyDigits, containsOnlyOnce, containsOnlyWhitespaces, containsPattern, containsPattern, containsPatternSatisfying, containsPatternSatisfying, containsSequence, containsSequence, containsSubsequence, containsSubsequence, containsWhitespaces, doesNotContain, doesNotContain, doesNotContainAnyWhitespaces, doesNotContainIgnoringCase, doesNotContainOnlyWhitespaces, doesNotContainPattern, doesNotContainPattern, doesNotEndWith, doesNotEndWithIgnoringCase, doesNotEndWithWhitespaces, doesNotMatch, doesNotMatch, doesNotStartWith, doesNotStartWithIgnoringCase, doesNotStartWithWhitespaces, endsWith, endsWithIgnoringCase, hasLineCount, hasSameSizeAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, inBinary, inHexadecimal, inUnicode, isAlphabetic, isAlphanumeric, isASCII, isBlank, isEmpty, isEqualToIgnoringCase, isEqualToIgnoringNewLines, isEqualToIgnoringWhitespace, isEqualToNormalizingNewlines, isEqualToNormalizingPunctuationAndWhitespace, isEqualToNormalizingUnicode, isEqualToNormalizingWhitespace, isHexadecimal, isJavaBlank, isLowerCase, isMixedCase, isNotBlank, isNotEmpty, isNotEqualToIgnoringCase, isNotEqualToIgnoringWhitespace, isNotEqualToNormalizingWhitespace, isNotJavaBlank, isNullOrEmpty, isPrintable, isSubstringOf, isUpperCase, isVisible, isXmlEqualTo, isXmlEqualToContentOf, matches, matches, matchesSatisfying, matchesSatisfying, startsWith, startsWithIgnoringCase, usingDefaultElementComparator, usingElementComparator
Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractTextAssert
-
AbstractTextAssert
-
-
Method Details
-
hasSameContentAs
Assert this text has the same content as the content defined by the specifiedResource
. Differences in newlines are ignored- Parameters:
expected
- a resource with the expected content- Returns:
this
assertion object- See Also:
-
AbstractCharSequenceAssert.isEqualToIgnoringNewLines(CharSequence)
-
contains
Assert this text contains the content defined by the specifiedResource
. Differences in newlines are ignored- Parameters:
content
- a resource with the partial expected content- Returns:
this
assertion object- See Also:
-
AbstractCharSequenceAssert.containsIgnoringNewLines(CharSequence...)
-
containsExactly
Assert this text contains exactly the specified lines.- Parameters:
lines
- the lines that constitute the content of this text- Returns:
this
assertion object
-
lines
Return anassert
for the lines that constitute this text, to allow chaining of lines-specific assertions from this call.- Returns:
- a
ListAssert
for the lines that constitutes this text
-