public class JLabelDriver extends JComponentDriver implements TextDisplayDriver<JLabel>
JLabel
s:
org.fest.swing.fixture
in your tests.robot
Constructor and Description |
---|
JLabelDriver(Robot robot)
Creates a new
JLabelDriver . |
Modifier and Type | Method and Description |
---|---|
void |
requireText(JLabel label,
Pattern pattern)
Asserts that the text of the
matches the given regular expression pattern. |
void |
requireText(JLabel label,
String expected)
Asserts that the text of the
is equal to the specified String . |
String |
textOf(JLabel label)
Returns the text of the given
. |
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible
move, resize, resizeHeight, resizeWidth
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
public JLabelDriver(Robot robot)
JLabelDriver
.robot
- the robot to use to simulate user input.@RunsInEDT public void requireText(JLabel label, String expected)
JLabel
is equal to the specified String
.requireText
in interface TextDisplayDriver<JLabel>
label
- the target JLabel
.expected
- the text to match.AssertionError
- if the text of the JLabel
is not equal to the given one.@RunsInEDT public void requireText(JLabel label, Pattern pattern)
JLabel
matches the given regular expression pattern.requireText
in interface TextDisplayDriver<JLabel>
label
- the target JLabel
.pattern
- the regular expression pattern to match.AssertionError
- if the text of the JLabel
does not match the given regular expression pattern.NullPointerException
- if the given regular expression pattern is null
.@RunsInEDT public String textOf(JLabel label)
JLabel
.textOf
in interface TextDisplayDriver<JLabel>
label
- the given JLabel
.JLabel
.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.