Class AbstractTextFlowAssert<SELF extends AbstractTextFlowAssert<SELF>>
- All Implemented Interfaces:
org.assertj.core.api.Assert<SELF,,javafx.css.Styleable> org.assertj.core.api.Descriptable<SELF>,org.assertj.core.api.ExtensionPoints<SELF,javafx.css.Styleable>
- Direct Known Subclasses:
TextFlowAssert
TextFlow assertions.-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTextFlowAssert(javafx.scene.text.TextFlow actual, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptiondoesNotHaveColoredText(String coloredTextMarkup) Verifies that the actualTextFlowdoes not have the givencoloredTextMarkup.doesNotHaveExactlyColoredText(String coloredTextMarkup) Verifies that the actualTextFlowdoes not have exactly the givencoloredTextMarkup.doesNotHaveText(String text) Verifies that the actualTextFlowdoes not have exactly the giventext(the result of combining all of its text-based children's text together).hasColoredText(String coloredTextMarkup) Verifies that the actualTextFlowhas the givencoloredTextMarkup.hasExactlyColoredText(String coloredTextMarkup) Verifies that the actualTextFlowhas exactly the givencoloredTextMarkup.Verifies that the actualTextFlowhas exactly the giventext(the result of combining all of its text-based children's text together).Methods inherited from class org.testfx.assertions.api.AbstractParentAssert
doesNotHaveExactlyNumChildren, hasAnyChild, hasExactlyNumChildren, hasNoChildrenMethods inherited from class org.testfx.assertions.api.AbstractNodeAssert
doesNotHaveChild, hasChild, hasExactlyChildren, isDisabled, isEnabled, isFocused, isInvisible, isNotFocused, isVisibleMethods inherited from class org.testfx.assertions.api.AbstractStyleableAssert
doesNotHaveId, doesNotHaveStyle, doesNotHaveStyleableParent, doesNotHaveTypeSelector, hasId, hasStyle, hasStyleableParent, hasTypeSelectorMethods 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, inBinary, inHexadecimal, 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, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractTextFlowAssert
-
-
Method Details
-
hasText
Verifies that the actualTextFlowhas exactly the giventext(the result of combining all of its text-based children's text together).- Parameters:
text- the given text to compare the actual text to- Returns:
- this assertion object
-
doesNotHaveText
Verifies that the actualTextFlowdoes not have exactly the giventext(the result of combining all of its text-based children's text together).- Parameters:
text- the given text to compare the actual text to- Returns:
- this assertion object
-
hasColoredText
Verifies that the actualTextFlowhas the givencoloredTextMarkup. The color is matched by using the closest named color, as described below.Colors are specified using the following markup:
<COLOR>text</COLOR>Where COLOR is one of JavaFX's named colors.
Here is an example for verifying that a TextFlow contains the text "hello" and that the named color that has the closest value to the color of the text is Colors.RED:
Text text = new Text("hello"); text.setFill(Colors.RED); TextFlow textFlow = new TextFlow(text); assertThat(textFlow).hasColoredText("<RED>hello</RED>");- Parameters:
coloredTextMarkup- the given colored text markup to compare the actual colored text to- Returns:
- this assertion object
- See Also:
-
doesNotHaveColoredText
Verifies that the actualTextFlowdoes not have the givencoloredTextMarkup. The color is matched by using the closest named color, as described below.Colors are specified using the following markup:
<COLOR>text</COLOR>Where COLOR is one of JavaFX's named colors.
Here is an example for verifying that a TextFlow does not contain the text "hello" with any color that has the closest named color Colors.RED:
Text text = new Text("hello"); text.setFill(Colors.BLUE); TextFlow textFlow = new TextFlow(text); assertThat(textFlow).doesNotHaveColoredText("<RED>hello</RED>");- Parameters:
coloredTextMarkup- the given colored text markup to compare the actual colored text to- Returns:
- this assertion object
- See Also:
-
hasExactlyColoredText
Verifies that the actualTextFlowhas exactly the givencoloredTextMarkup. The color is matched in an exact way, as described below.Colors are specified using the following markup:
<COLOR>text</COLOR>Where COLOR is one of JavaFX's named colors.
Here is an example for verifying that a TextFlow contains the text "hello" and that the color of the text is exactly Colors.BLUE (that is, it has an RGB value of (0, 0, 255)).
Text text = new Text("hello"); text.setFill(Colors.BLUE); // or: text.setFill(Colors.rgb(0, 0, 255)); TextFlow textFlow = new TextFlow(text); assertThat(textFlow).hasExactlyColoredText("hello ");- Parameters:
coloredTextMarkup- the given colored text markup to compare the actual colored text to- Returns:
- this assertion object
- See Also:
-
doesNotHaveExactlyColoredText
Verifies that the actualTextFlowdoes not have exactly the givencoloredTextMarkup. The color is matched in an exact way, as described below.Colors are specified using the following markup:
<COLOR>text</COLOR>Where COLOR is one of JavaFX's named colors.
Here is an example for verifying that a TextFlow does not contain the text "hello" and that the color of the text is not exactly Colors.BLUE (that is, it does not have an RGB value of (0, 0, 255)).
Text text = new Text("hello"); text.setFill(Colors.rgb(0, 0, 254)); TextFlow textFlow = new TextFlow(text); assertThat(textFlow).doesNotHaveExactlyColoredText("hello ");- Parameters:
coloredTextMarkup- the given colored text markup to compare the actual colored text to- Returns:
- this assertion object
- See Also:
-