public class AbstractTextFlowAssert<SELF extends AbstractTextFlowAssert<SELF>> extends AbstractParentAssert<SELF>
TextFlow assertions.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTextFlowAssert(javafx.scene.text.TextFlow actual,
java.lang.Class<?> selfType) |
| Modifier and Type | Method and Description |
|---|---|
SELF |
doesNotHaveColoredText(java.lang.String coloredTextMarkup)
Verifies that the actual
TextFlow does not have the given coloredTextMarkup. |
SELF |
doesNotHaveExactlyColoredText(java.lang.String coloredTextMarkup)
Verifies that the actual
TextFlow does not have exactly the given
coloredTextMarkup. |
SELF |
doesNotHaveText(java.lang.String text)
Verifies that the actual
TextFlow does not have exactly the given
text (the result of combining all of its text-based children's text together). |
SELF |
hasColoredText(java.lang.String coloredTextMarkup)
Verifies that the actual
TextFlow has the given coloredTextMarkup. |
SELF |
hasExactlyColoredText(java.lang.String coloredTextMarkup)
Verifies that the actual
TextFlow has exactly the given coloredTextMarkup. |
SELF |
hasText(java.lang.String text)
Verifies that the actual
TextFlow has exactly the given text
(the result of combining all of its text-based children's text together). |
doesNotHaveExactlyNumChildren, hasAnyChild, hasExactlyNumChildren, hasNoChildrendoesNotHaveChild, hasChild, hasExactlyChildren, isDisabled, isEnabled, isFocused, isInvisible, isNotFocused, isVisibleas, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorprotected AbstractTextFlowAssert(javafx.scene.text.TextFlow actual,
java.lang.Class<?> selfType)
public SELF hasText(java.lang.String text)
TextFlow has exactly the given text
(the result of combining all of its text-based children's text together).text - the given text to compare the actual text topublic SELF doesNotHaveText(java.lang.String text)
TextFlow does not have exactly the given
text (the result of combining all of its text-based children's text together).text - the given text to compare the actual text topublic SELF hasColoredText(java.lang.String coloredTextMarkup)
TextFlow has the given coloredTextMarkup.
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>");
coloredTextMarkup - the given colored text markup to compare the actual colored text topublic SELF doesNotHaveColoredText(java.lang.String coloredTextMarkup)
TextFlow does not have the given coloredTextMarkup.
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>");
coloredTextMarkup - the given colored text markup to compare the actual colored text topublic SELF hasExactlyColoredText(java.lang.String coloredTextMarkup)
TextFlow has exactly the given coloredTextMarkup.
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 ");
coloredTextMarkup - the given colored text markup to compare the actual colored text topublic SELF doesNotHaveExactlyColoredText(java.lang.String coloredTextMarkup)
TextFlow does not have exactly the given
coloredTextMarkup. 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 ");
coloredTextMarkup - the given colored text markup to compare the actual colored text to