Class
caplin.presenter.testing

PresentationModelFixture

The PresentationModelFixture serves to manipulate and verify the state of the presentation model of a presenter component.

Constructor Summary

Attributes Name and Description
caplin.presenter.testing.PresentationModelFixture()

Constructs a caplin.presenter.testing.PresentationModelFixture.

Method Summary

Attributes Name and Description
void canHandleProperty(String sProperty)

The PresentationModelFixture handles all valid properties and methods within the presentation model of a presenter component.

void doGiven(String sProperty, Variant vValue)

This method enables the fixture to set the value on a presentation node or property within the presentation model of a presenter component.

void doThen(String sProperty, Variant vValue)

This method enables the fixture to verify the values on the properties of the presentation model of a presenter component, including NodeLists.

void doWhen(String sProperty, Variant vValue)

This method enables the fixture to set the value on a presentation node or property within the presentation model of a presenter component.

Methods implemented from class caplin.component.testing.ComponentModelFixture:
setComponent
Methods from caplin.testing.Fixture:
addSubFixtures, setUp, tearDown

Constructor Detail

caplin.presenter.testing.PresentationModelFixture()

Constructs a caplin.presenter.testing.PresentationModelFixture.

Method Detail

void canHandleProperty(String sProperty)

The PresentationModelFixture handles all valid properties and methods within the presentation model of a presenter component. Nested property nodes in a presentation model can be referenced by dotted notation.

Parameters
String sProperty The property name to check.
See
caplin.testing.Fixture#canHandleProperty

void doGiven(String sProperty, Variant vValue)

This method enables the fixture to set the value on a presentation node or property within the presentation model of a presenter component. In addition, it is also possible to trigger the invocation of a method defined within the presentation model, using the 'invoked' property.

Parameters
String sProperty The property name
Variant vValue The value to check.
See
caplin.testing.Fixture#doGiven

void doThen(String sProperty, Variant vValue)

This method enables the fixture to verify the values on the properties of the presentation model of a presenter component, including NodeLists. It is also possible to check the 'invocationCount' on a method within the presentation model.

Parameters
String sProperty The property name
Variant vValue The value to set.
See
caplin.testing.Fixture#doThen

void doWhen(String sProperty, Variant vValue)

This method enables the fixture to set the value on a presentation node or property within the presentation model of a presenter component. In addition, it is also possible to trigger the invocation of a method defined within the presentation model, using the 'invoked' property.

Parameters
String sProperty The property name
Variant vValue The value to set.
See
caplin.testing.Fixture#doWhen