public class JProgressBarFixture extends ComponentFixture<JProgressBar> implements StateVerificationFixture, JComponentFixture, TextDisplayFixture
JProgressBar
s:
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target
Constructor and Description |
---|
JProgressBarFixture(Robot robot,
JProgressBar target)
Creates a new
. |
JProgressBarFixture(Robot robot,
String labelName)
Creates a new
. |
Modifier and Type | Method and Description |
---|---|
Object |
clientProperty(Object key)
Returns the client property stored in this fixture's
, under the given key. |
protected void |
driver(JProgressBarDriver newDriver)
Sets the
to be used by this fixture. |
JProgressBarFixture |
requireDeterminate()
Asserts that this fixture's
is in determinate mode. |
JProgressBarFixture |
requireDisabled()
Asserts that this fixture's
is disabled. |
JProgressBarFixture |
requireEnabled()
Asserts that this fixture's
is enabled. |
JProgressBarFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's
is enabled. |
JProgressBarFixture |
requireIndeterminate()
Asserts that this fixture's
is in indeterminate mode. |
JProgressBarFixture |
requireNotVisible()
Asserts that this fixture's
is not visible. |
JProgressBarFixture |
requireText(Pattern pattern)
Asserts that the text of this fixture's
matches the given regular expression
pattern. |
JProgressBarFixture |
requireText(String expected)
Asserts that the text of this fixture's
is equal to the specified
String . |
JProgressBarFixture |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's
matches the given regular expression
pattern. |
JProgressBarFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's
matches the given value. |
JProgressBarFixture |
requireValue(int value)
Asserts that the value of this fixture's
is equal to the given one. |
JProgressBarFixture |
requireVisible()
Asserts that this fixture's
is visible. |
String |
text()
Returns the text of this fixture's
. |
JProgressBarFixture |
waitUntilIsDeterminate()
Waits until the value of this fixture's
is in determinate mode. |
JProgressBarFixture |
waitUntilIsDeterminate(Timeout timeout)
Waits until the value of this fixture's
is in determinate mode. |
JProgressBarFixture |
waitUntilValueIs(int value)
Waits until the value of this fixture's
is equal to the given value. |
JProgressBarFixture |
waitUntilValueIs(int value,
Timeout timeout)
Waits until the value of this fixture's
is equal to the given value. |
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNull
public JProgressBarFixture(Robot robot, JProgressBar target)
JProgressBarFixture
.robot
- performs simulation of user events on the given JProgressBar
.target
- the JProgressBar
to be managed by this fixture.NullPointerException
- if robot
is null
.NullPointerException
- if target
is null
.public JProgressBarFixture(Robot robot, String labelName)
JProgressBarFixture
.robot
- performs simulation of user events on a JProgressBar
.labelName
- the name of the JProgressBar
to find using the given Robot
.NullPointerException
- if robot
is null
.ComponentLookupException
- if a matching JProgressBar
could not be found.ComponentLookupException
- if more than one matching JProgressBar
is found.protected final void driver(JProgressBarDriver newDriver)
JProgressBarDriver
to be used by this fixture.newDriver
- the new JProgressBarDriver
.NullPointerException
- if the given driver is null
.public JProgressBarFixture requireValue(int value)
JProgressBar
is equal to the given one.value
- the expected value.AssertionError
- if the value of this fixture's JProgressBar
is not equal to the given one.public JProgressBarFixture requireDeterminate()
JProgressBar
is in determinate mode.AssertionError
- if this fixture's JProgressBar
is not in determinate mode.public JProgressBarFixture requireIndeterminate()
JProgressBar
is in indeterminate mode.AssertionError
- if this fixture's JProgressBar
is not in indeterminate mode.public String text()
JProgressBar
.text
in interface TextDisplayFixture
JProgressBar
.public JProgressBarFixture requireText(String expected)
JProgressBar
is equal to the specified
String
.requireText
in interface TextDisplayFixture
expected
- the text to match.AssertionError
- if the text of this fixture's JProgressBar
is not equal to the given one.public JProgressBarFixture requireText(Pattern pattern)
JProgressBar
matches the given regular expression
pattern.requireText
in interface TextDisplayFixture
pattern
- the regular expression pattern to match.AssertionError
- if the text of this fixture's JProgressBar
does not match the given regular
expression pattern.NullPointerException
- if the given regular expression pattern is null
.public JProgressBarFixture requireToolTip(String expected)
JProgressBar
matches the given value.requireToolTip
in interface ToolTipDisplayFixture
expected
- the given value. It can be a regular expression.AssertionError
- if the toolTip in this fixture's JProgressBar
does not match the given value.public JProgressBarFixture requireToolTip(Pattern pattern)
JProgressBar
matches the given regular expression
pattern.requireToolTip
in interface ToolTipDisplayFixture
pattern
- the regular expression pattern to match.NullPointerException
- if the given regular expression pattern is null
.AssertionError
- if the toolTip in this fixture's JProgressBar
does not match the given regular
expression pattern.public JProgressBarFixture requireEnabled()
JProgressBar
is enabled.requireEnabled
in interface StateVerificationFixture
AssertionError
- if this fixture's JProgressBar
is disabled.public JProgressBarFixture requireEnabled(Timeout timeout)
JProgressBar
is enabled.requireEnabled
in interface StateVerificationFixture
timeout
- the time this fixture will wait for the component to be enabled.WaitTimedOutError
- if this fixture's JProgressBar
is never enabled.public JProgressBarFixture requireDisabled()
JProgressBar
is disabled.requireDisabled
in interface StateVerificationFixture
AssertionError
- if this fixture's JProgressBar
is enabled.public JProgressBarFixture requireVisible()
JProgressBar
is visible.requireVisible
in interface StateVerificationFixture
AssertionError
- if this fixture's JProgressBar
is not visible.public JProgressBarFixture requireNotVisible()
JProgressBar
is not visible.requireNotVisible
in interface StateVerificationFixture
AssertionError
- if this fixture's JProgressBar
is visible.public Object clientProperty(Object key)
JProgressBar
, under the given key.clientProperty
in interface ClientPropertyStorageFixture
key
- the key to use to retrieve the client property.null
if the property was
not found.NullPointerException
- if the given key is null
.public JProgressBarFixture waitUntilValueIs(int value)
JProgressBar
is equal to the given value.value
- the expected value.IllegalArgumentException
- if the given value is less than the JProgressBar
's minimum value.IllegalArgumentException
- if the given value is greater than the JProgressBar
's maximum value.WaitTimedOutError
- if the value of the JProgressBar
does not reach the expected value within
30 seconds.public JProgressBarFixture waitUntilValueIs(int value, Timeout timeout)
JProgressBar
is equal to the given value.value
- the expected value.timeout
- the amount of time to wait.IllegalArgumentException
- if the given value is less than the JProgressBar
's minimum value.IllegalArgumentException
- if the given value is greater than the JProgressBar
's maximum value.NullPointerException
- if the given timeout is null
.WaitTimedOutError
- if the value of the JProgressBar
does not reach the expected value within
the specified timeout.public JProgressBarFixture waitUntilIsDeterminate()
JProgressBar
is in determinate mode.WaitTimedOutError
- if the JProgressBar
does not reach determinate mode within 30 seconds.public JProgressBarFixture waitUntilIsDeterminate(Timeout timeout)
JProgressBar
is in determinate mode.timeout
- the amount of time to wait.NullPointerException
- if the given timeout is null
.WaitTimedOutError
- if the JProgressBar
does not reach determinate mode within the specified
timeout.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.