Class AbstractTextFlowAssert<SELF extends AbstractTextFlowAssert<SELF>>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,javafx.css.Styleable>
-
- org.testfx.assertions.api.AbstractStyleableAssert<SELF>
-
- org.testfx.assertions.api.AbstractNodeAssert<SELF>
-
- org.testfx.assertions.api.AbstractParentAssert<SELF>
-
- org.testfx.assertions.api.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
public class AbstractTextFlowAssert<SELF extends AbstractTextFlowAssert<SELF>> extends AbstractParentAssert<SELF>
Base class for allTextFlowassertions.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTextFlowAssert(javafx.scene.text.TextFlow actual, java.lang.Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELFdoesNotHaveColoredText(java.lang.String coloredTextMarkup)Verifies that the actualTextFlowdoes not have the givencoloredTextMarkup.SELFdoesNotHaveExactlyColoredText(java.lang.String coloredTextMarkup)Verifies that the actualTextFlowdoes not have exactly the givencoloredTextMarkup.SELFdoesNotHaveText(java.lang.String text)Verifies that the actualTextFlowdoes not have exactly the giventext(the result of combining all of its text-based children's text together).SELFhasColoredText(java.lang.String coloredTextMarkup)Verifies that the actualTextFlowhas the givencoloredTextMarkup.SELFhasExactlyColoredText(java.lang.String coloredTextMarkup)Verifies that the actualTextFlowhas exactly the givencoloredTextMarkup.SELFhasText(java.lang.String text)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, hasNoChildren
-
Methods inherited from class org.testfx.assertions.api.AbstractNodeAssert
doesNotHaveChild, hasChild, hasExactlyChildren, isDisabled, isEnabled, isFocused, isInvisible, isNotFocused, isVisible
-
Methods inherited from class org.testfx.assertions.api.AbstractStyleableAssert
doesNotHaveId, doesNotHaveStyle, doesNotHaveStyleableParent, doesNotHaveTypeSelector, hasId, hasStyle, hasStyleableParent, hasTypeSelector
-
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, 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, withThreadDumpOnError
-
-
-
-
Method Detail
-
hasText
public SELF hasText(java.lang.String text)
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
public SELF doesNotHaveText(java.lang.String text)
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
public SELF hasColoredText(java.lang.String coloredTextMarkup)
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:
- Named Colors
-
doesNotHaveColoredText
public SELF doesNotHaveColoredText(java.lang.String coloredTextMarkup)
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:
- Named Colors
-
hasExactlyColoredText
public SELF hasExactlyColoredText(java.lang.String coloredTextMarkup)
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:
- Named Colors
-
doesNotHaveExactlyColoredText
public SELF doesNotHaveExactlyColoredText(java.lang.String coloredTextMarkup)
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:
- Named Colors
-
-