public interface ItemGroupFixture
Component that contains or displays a group of items,
and verification of the state of such Component.| Modifier and Type | Method and Description |
|---|---|
ItemGroupFixture |
clearSelection()
Clears the selection in this fixture's
. |
String[] |
contents()
Returns the
String representation of the elements in this fixture's . |
ItemGroupFixture |
requireItemCount(int expected)
Verifies that this fixture's
has the expected number of items |
ItemGroupFixture |
requireNoSelection()
Verifies that this fixture's
does not have a selection. |
ItemGroupFixture |
requireSelection(int index)
Verifies that the index of the selected item in this fixture's
is equal to the given
value. |
ItemGroupFixture |
requireSelection(Pattern pattern)
Verifies that the value of the selected item in this fixture's
matches the given
regular expression pattern. |
ItemGroupFixture |
requireSelection(String value)
Verifies that the value of the selected item in this fixture's
matches the given
value. |
ItemGroupFixture |
selectItem(int index)
Simulates a user selecting an item in this fixture's
. |
ItemGroupFixture |
selectItem(Pattern pattern)
Simulates a user selecting an item in this fixture's
. |
ItemGroupFixture |
selectItem(String value)
Simulates a user selecting an item in this fixture's
. |
Object |
valueAt(int index)
Returns the value of an item in the
managed by this fixture. |
String[] contents()
String representation of the elements in this fixture's Component.String representation of the elements in this fixture's Component.ItemGroupFixture clearSelection()
Component.ItemGroupFixture selectItem(int index)
Component.index - the index of the item to select.ItemGroupFixture selectItem(String value)
Component.value - the value of the item to select. It can be a regular expression.ItemGroupFixture selectItem(Pattern pattern)
Component. The text of the item to
select must match the given regular expression pattern.pattern - the regular expression pattern to match.NullPointerException - if the given regular expression pattern is null.Object valueAt(int index)
Component managed by this fixture. If the value is not
meaningful, this method will return null.index - the index of the item to return.null if nothing meaningful.ItemGroupFixture requireSelection(String value)
Component matches the given
value.value - the value to match. It can be a regular expression.AssertionError - if the selected item does not match the given value.ItemGroupFixture requireSelection(Pattern pattern)
Component matches the given
regular expression pattern.pattern - the regular expression pattern to match.NullPointerException - if the given regular expression pattern is null.AssertionError - if the selected item does not match the given regular expression pattern.ItemGroupFixture requireSelection(int index)
Component is equal to the given
value.index - the expected selection index.AssertionError - if the selection index is not equal to the given value.ItemGroupFixture requireNoSelection()
Component does not have a selection.AssertionError - if this fixture's Component has a selection.ItemGroupFixture requireItemCount(int expected)
Component has the expected number of itemsexpected - the expected number of items.AssertionError - if the number of items in this fixture's Component is not equal to the expected
one.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.