PresenterComponentFixture
serves to create presenter components in order to test the
component behavior.
Tests may use the PresenterComponentFixture
to:
given("component.opened = true")
and(component presentation model is in state A)
when(component presentation model is modified)
then(component presentation model is in new state B)
given("component.viewOpened = true")
and(component presentation model is in state A)
and(component view is in state X)
when(button clicked on component view)
then(component presentation model is in new state B)
and(component view is in new state Y)
Attributes | Name and Description |
---|---|
|
caplin.presenter.testing.PresenterComponentFixture(String sTemplateId, String sPresentationModel)
Constructs a |
Attributes | Name and Description |
---|---|
|
void
canHandleProperty(String sProperty)
PresenterComponentFixture handles properties 'opened' and 'viewOpened'. |
|
void
doGiven(String sProperty, Variant vValue)
This method creates the presenter component (if property = 'opened') and binds it to the view template (if property = 'viewOpened') using the references to the template Id and presentation model provided in the constructor. |
►
caplin.presenter.testing.PresenterComponentFixture(String sTemplateId, String sPresentationModel)
Constructs a caplin.presenter.testing.PresenterComponentFixture
.
String | sTemplateId | the HTML template id representing the view of the presenter component. Required, not-null. |
String | sPresentationModel | the presentation model class name for the presenter component. Required, not-null. |
►
void
canHandleProperty(String sProperty)
PresenterComponentFixture handles properties 'opened' and 'viewOpened'.
String | sProperty | The property to check. |
►
void
doGiven(String sProperty, Variant vValue)
This method creates the presenter component (if property = 'opened') and binds it to the view template (if property = 'viewOpened') using the references to the template Id and presentation model provided in the constructor.
String | sProperty | The property name |
Variant | vValue | The value to check. |