Caplin Trader 5.1.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 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.

Implements:
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.

Implements:
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.

Implements:
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.

Implements:
See:
  • br-test/Fixture#doWhen

setComponent(oComponent)

This method is called be the module:br-component/testing/ComponentFixture after the component is created.

Parameters:
Name Type Description
oComponent module:br-component/Component

the component instance managed by this ComponentModelFixture.

Implements:

tearDown()

This method is called just after a GWT test. This optional interface method can be implemented if the fixture is required to correctly tear down the system-under-test after each test or to reset any state held in the fixture's implementation.

Inherited From:
Implements: