MenuModelFixture
serves to create a context for testing the menu by interacting with a
provided caplin.menu.model.Menu
.
Tests may use the MenuModelFixture
to:
when("menuModel.addItemAt => 0")
when("menuModel.addSubmenuAt => 1")
when("menuModel.removeItemAt => 1")
when("menuModel.removeAll => true")
when("menuModel.disableItemAt => 1")
when("menuModel.enableItemAt => 1")
then("menuModel.callbackInvokedOnItem = 1")
then("menuModel.callbackNotInvokedOnItem = 1")
when (menuModel.0.addItemAt => 1)
, will mean you want to add an item at position 1 on the submenu
at position 0 (from the parent). You can use this with any of the above actions.
Attributes | Name and Description |
---|---|
|
caplin.menu.testing.MenuModelFixture()
Constructs a |
Attributes | Name and Description |
---|---|
|
void
canHandleProperty( property)
|
|
void
doGiven( propertyName, value)
|
|
void
doThen( propertyName, value)
|
|
void
doWhen( propertyName, value)
|
►
caplin.menu.testing.MenuModelFixture()
Constructs a caplin.menu.testing.MenuModelFixture
.
►
void
canHandleProperty( property)
See caplin.testing.Fixture#canHandleProperty
property |
►
void
doGiven( propertyName, value)
See caplin.testing.Fixture#doGiven
propertyName | ||
value |