Package org.testfx.assertions.api
Class AbstractTextAssert<SELF extends AbstractTextAssert<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.AbstractTextAssert<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:
TextAssert
public class AbstractTextAssert<SELF extends AbstractTextAssert<SELF>> extends AbstractNodeAssert<SELF>
Base class for allTextassertions.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTextAssert(javafx.scene.text.Text actual, java.lang.Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELFdoesNotHaveFont(javafx.scene.text.Font font)Verifies that the actualTextdoes not have the givenfont.SELFdoesNotHaveFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)Verifies that the actualTextdoes not have the givensmoothingType(eitherFontSmoothingType.GRAYorFontSmoothingType.LCD).SELFdoesNotHaveStrikethrough()Verifies that the actualTextdoes not have strikethrough (that is, should be drawn with a line through it).SELFdoesNotHaveText(java.lang.String text)Verifies that the actualTextdoes not have exactly the giventext.SELFdoesNotHaveText(org.hamcrest.Matcher<java.lang.String> matcher)Verifies that the actualTextis not matched by the givenmatcher.SELFhasFont(javafx.scene.text.Font font)Verifies that the actualTexthas the givenfont.SELFhasFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)Verifies that the actualTexthas the givensmoothingType(eitherFontSmoothingType.GRAYorFontSmoothingType.LCD).SELFhasStrikethrough()Verifies that the actualTexthas strikethrough (that is, should be drawn with a line through it).SELFhasText(java.lang.String text)Verifies that the actualTexthas exactly the giventext.SELFhasText(org.hamcrest.Matcher<java.lang.String> matcher)Verifies that the actualTextis matched by the givenmatcher.SELFisNotUnderlined()Verifies that the actualTextis not underlined (that is, should be drawn with a line below it).SELFisUnderlined()Verifies that the actualTextis underlined (that is, should be drawn with a line below it).-
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 actualTexthas exactly the giventext.- 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 actualTextdoes not have exactly the giventext.- Parameters:
text- the given text to compare the actual text to- Returns:
- this assertion object
-
hasText
public SELF hasText(org.hamcrest.Matcher<java.lang.String> matcher)
Verifies that the actualTextis matched by the givenmatcher.- Parameters:
matcher- theStringmatcher to test the actual text with- Returns:
- this assertion object
-
doesNotHaveText
public SELF doesNotHaveText(org.hamcrest.Matcher<java.lang.String> matcher)
Verifies that the actualTextis not matched by the givenmatcher.- Parameters:
matcher- theStringmatcher to test the actual text with- Returns:
- this assertion object
-
hasFont
public SELF hasFont(javafx.scene.text.Font font)
Verifies that the actualTexthas the givenfont.- Parameters:
font- the given font to compare the actual font of the text to- Returns:
- this assertion object
-
doesNotHaveFont
public SELF doesNotHaveFont(javafx.scene.text.Font font)
Verifies that the actualTextdoes not have the givenfont.- Parameters:
font- the given font to compare the actual font of the text to- Returns:
- this assertion object
-
hasFontSmoothingType
public SELF hasFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)
Verifies that the actualTexthas the givensmoothingType(eitherFontSmoothingType.GRAYorFontSmoothingType.LCD).- Parameters:
smoothingType- the given font smoothing type to compare the actual font smoothing type of the text to- Returns:
- this assertion object
-
doesNotHaveFontSmoothingType
public SELF doesNotHaveFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)
Verifies that the actualTextdoes not have the givensmoothingType(eitherFontSmoothingType.GRAYorFontSmoothingType.LCD).- Parameters:
smoothingType- the given font smoothing type to compare the actual font smoothing type of the text to- Returns:
- this assertion object
-
hasStrikethrough
public SELF hasStrikethrough()
Verifies that the actualTexthas strikethrough (that is, should be drawn with a line through it).- Returns:
- this assertion object
-
doesNotHaveStrikethrough
public SELF doesNotHaveStrikethrough()
Verifies that the actualTextdoes not have strikethrough (that is, should be drawn with a line through it).- Returns:
- this assertion object
-
isUnderlined
public SELF isUnderlined()
Verifies that the actualTextis underlined (that is, should be drawn with a line below it).- Returns:
- this assertion object
-
isNotUnderlined
public SELF isNotUnderlined()
Verifies that the actualTextis not underlined (that is, should be drawn with a line below it).- Returns:
- this assertion object
-
-