Caplin Trader 4.8.0

Class: module:br/presenter/testing/PresentationModelFixture

module:br/presenter/testing/PresentationModelFixture

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

Constructor

new module:br/presenter/testing/PresentationModelFixture()

Constructs a br.presenter.testing.PresentationModelFixture.
Implements:

Methods

canHandleProperty(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:
Name Type Description
sProperty String The property name to check.
See:
  • br.test.Fixture#canHandleProperty

doGiven(sProperty, 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:
Name Type Description
sProperty String The property name
vValue Variant The value to check.
See:
  • br.test.Fixture#doGiven

doThen(sProperty, 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:
Name Type Description
sProperty String The property name
vValue Variant The value to set.
See:
  • br.test.Fixture#doThen

doWhen(sProperty, 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:
Name Type Description
sProperty String The property name
vValue Variant The value to set.
See:
  • br.test.Fixture#doWhen