DataSubscriptionFixture
serves to create a context for providing mock price message updates, through
the use of 'caplin.message-service'.
Tests may use the DataSubscriptionFixture
to:
given(PM is in state A)
when("message.dataUpdateReceived => '/FX/USDGBP|DATA_UPDATE_1'")
then(PM is in state B)
given(PM is in state A)
when("message.dataStatusChanged => '/FX/USDGBP|STALE'")
then(PM is in state B)
given(PM is in state A)
then("message.subjectRequested => '/FX/USDGBP'")
given(PM is in state A)
then("message.subjectNotRequested => '/FX/USDGBP'")
Attributes | Name and Description |
---|---|
|
caplin.testing.DataSubscriptionFixture()
Constructs a |
Attributes | Name and Description |
---|---|
|
void
addNamedValueMap(String name, Map values)
This method enables a FixtureFactory to register a set of data update identifiers and corresponding maps of mock field data with this DataSubscriptionFixture. |
|
void
canHandleProperty(String propertyName)
DataSubscriptionFixture can handle the properties 'dataUpdateReceived', 'dataStatusChanged', 'subjectRequested' and 'subjectNotRequested'. |
|
void
doGiven( propertyName, value)
|
|
void
doThen( propertyName, value)
|
|
void
doWhen( propertyName, value)
|
►
caplin.testing.DataSubscriptionFixture()
Constructs a caplin.testing.DataSubscriptionFixture
.
►
void
addNamedValueMap(String name, Map values)
This method enables a FixtureFactory to register a set of data update identifiers and corresponding maps of mock field data with this DataSubscriptionFixture. Tests using the fixture to send mock data updates are able to refer to update data using property value 'Subject_name|Data_update_identifier'.
String | name | the data update identifier. |
Map | values | the update data map from field names to field values. |
►
void
canHandleProperty(String propertyName)
DataSubscriptionFixture can handle the properties 'dataUpdateReceived', 'dataStatusChanged', 'subjectRequested' and 'subjectNotRequested'.
String | propertyName | The property to check. |
►
void
doGiven( propertyName, value)
propertyName | ||
value |