public class TimeSliderCompositeTester extends AbstractSWTTester
TimeSliderComposite
. It tests
the default values, selection listeners, and setting the range of time values
for the underlying scale, spinner, and text widgets.Constructor and Description |
---|
TimeSliderCompositeTester() |
Modifier and Type | Method and Description |
---|---|
void |
afterEachTest()
This method is called after each test is run.
|
void |
beforeEachTest()
This method is called before each test is run.
|
void |
checkDefaults()
Checks the default values for the time widget.
|
void |
checkFirstAndLastStepButtonsNotifySelectionListeners()
Checks that clicking the first and last timestep buttons in the options
menu update the timestep properly and notifies selection listeners.
|
void |
checkInvalidThreadAccessExceptions()
Checks that attempting to set or get fields on the widget from a non-UI
thread throws an invalid thread access exception.
|
void |
checkNullSelectionListenerExceptions()
Checks that you cannot add null selection listeners to the time widget.
|
void |
checkPauseOnNewSelectionByWidget()
Checks that, when any of the time widgets are updated, the active play
action is cancelled.
|
void |
checkPauseWhenSettersCalled()
Checks that all but a few certain setters will cause the widget to pause
if it is currently playing.
|
void |
checkPlayPauseMethods()
Checks the return values for the play, pause, and isPlaying methods.
|
void |
checkPlayWidgetNotifiesSelectionListeners()
Checks that listeners are periodically updated when the play button is
clicked, and that notifications stop when the same (pause) button is
clicked.
|
void |
checkScaleNotifiesSelectionListeners()
Checks that listeners are updated when the scale widget changes.
|
void |
checkSetFPS()
Check the return values for setting the FPS as well as that the play rate
changes accordingly.
|
void |
checkSetFPSByOptionsMenu()
Checks that the FPS can be set via the options menu.
|
void |
checkSetLoop()
Checks the return values for setting and getting the looped playback
property.
|
void |
checkSetLoopByOptionsMenu()
Checks that playback looping can be toggled via the options menu.
|
void |
checkSetTime()
Checks the return values for setting the time and that the current time
for the widget changes accordingly.
|
void |
checkSetTimes()
Checks that the set of allowed times set and fetched.
|
void |
checkSetTimestep()
Checks the return values for setting the timestep and that the current
time for the widget changes accordingly.
|
void |
checkSetTimestepIndexException()
Checks that attempting to set the timestep to an invalid index throws an
IndexOutOfBoundsException.
|
void |
checkSpinnerNotifiesSelectionListeners()
Checks that listeners are updated when the spinner widget changes.
|
void |
checkTextNotifiesSelectionListeners()
Checks that listeners are updated when the spinner's associated text
widget changes.
|
void |
checkTextRejectsInvalidInput()
Checks that the widget denies changes when the spinner's associated text
widget is set to an invalid time.
|
void |
checkWidgetAppearance()
Checks that helpful tool tips are set on all of the child widgets.
|
void |
checkWidgetDisposedExceptions()
Checks that attempting to set or get fields on the widget throws a widget
disposed exception if it is disposed.
|
void |
checkWidgetsEnabled()
Checks that the widgets are enabled when they should be (when there is
more than 1 time to pick from) and disabled otherwise.
|
afterAllTests, beforeAllTests
afterClass, beforeClass
assertContains, assertDoesNotContain, assertEnabled, assertMatchesRegex, assertMatchesRegex, assertMatchesRegex, assertNotEnabled, assertNotSameWidget, assertNotSameWidget, assertNotVisible, assertSameWidget, assertSameWidget, assertText, assertText, assertTextContains, assertTextContains, assertTextDoesNotContain, assertTextDoesNotContain, assertVisible, captureScreenshot, pass, runBare
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, toString
public void beforeEachTest()
AbstractICEUITester
When overriding, be sure to call super.beforeEachTest()
at the
***BEGINNING OF YOUR METHOD***!
beforeEachTest
in class AbstractSWTTester
public void afterEachTest()
AbstractICEUITester
When overriding, be sure to call super.afterEachTest()
at the
***END OF YOUR METHOD***!
afterEachTest
in class AbstractSWTTester
public void checkDefaults()
public void checkPauseWhenSettersCalled()
public void checkPlayPauseMethods()
It also checks that this method can trigger notifications and that the widgets are updated accordingly.
public void checkSetFPS()
public void checkSetLoop()
This test checks that looped playback can be disabled. Checking that
enabled looped playback works is handled by
checkPlayWidgetNotifiesSelectionListeners()
.
public void checkSetTime()
It also checks that this method does not trigger notifications and that the widgets are updated accordingly.
public void checkSetTimes()
public void checkSetTimestep()
It also checks that this method does not trigger notifications and that the widgets are updated accordingly.
public void checkSetTimestepIndexException()
public void checkInvalidThreadAccessExceptions()
public void checkFirstAndLastStepButtonsNotifySelectionListeners()
public void checkNullSelectionListenerExceptions()
public void checkPauseOnNewSelectionByWidget()
public void checkPlayWidgetNotifiesSelectionListeners()
The times should also loop from last to first when the play button is clicked.
public void checkScaleNotifiesSelectionListeners()
public void checkSetFPSByOptionsMenu()
public void checkSetLoopByOptionsMenu()
public void checkSpinnerNotifiesSelectionListeners()
The times should also loop between last and first when the next/previous button is clicked.
public void checkTextNotifiesSelectionListeners()
public void checkTextRejectsInvalidInput()
public void checkWidgetDisposedExceptions()
public void checkWidgetsEnabled()
public void checkWidgetAppearance()