DataSubscriptionFixture
serves to create a context for providing mock price message updates, through
the use of a DataSubscriberStub.
Tests may use the DataSubscriptionFixture
to:
given(PM is in state A)
when("price.eventReceived => '/FX/USDGBP|FXTILE_UPDATES.TIER_UPDATE_1'")
then(PM is in state B)
Attributes | Name and Description |
---|---|
|
caplin.testing.DataSubscriptionFixture()
Constructs a |
Attributes | Name and Description |
---|---|
|
void
addNamedValueMap(String sName, Map mValues)
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 sProperty)
DataSubscriptionFixture can handle the property 'dataUpdateReceived'. |
|
void
doGiven(String sPropertyName, Variant vValue)
This method can be used with the 'dataUpdateReceived' property to trigger the stub to simulate data being received from the server. |
|
void
doThen(String sPropertyName, Variant vValue)
DataSubscriptionFixture does not support doThen. |
|
void
doWhen(String sPropertyName, Variant vValue)
This method can be used with the 'dataUpdateReceived' property to trigger the stub to simulate data being received from the server. |
►
caplin.testing.DataSubscriptionFixture()
Constructs a caplin.testing.DataSubscriptionFixture
.
►
void
addNamedValueMap(String sName, Map mValues)
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 | sName | the data update identifier. |
Map | mValues | the update data map from field names to field values. |
►
void
canHandleProperty(String sProperty)
DataSubscriptionFixture can handle the property 'dataUpdateReceived'.
String | sProperty | The property to check. |
►
void
doGiven(String sPropertyName, Variant vValue)
This method can be used with the 'dataUpdateReceived' property to trigger the stub to simulate data being received from the server. The 'dataUpdateReceived' property must be supplied with a subject and data map id, in the format NAME|DATA, where DATA is the key for one of the name-value pairs already supplied (caplin.testing.DataSubscriptionFixture.addNamedValueMap).
String | sPropertyName | The property name |
Variant | vValue | The value to check |
►
void
doThen(String sPropertyName, Variant vValue)
DataSubscriptionFixture does not support doThen.
String | sPropertyName | The property name |
Variant | vValue | The value to set |
►
void
doWhen(String sPropertyName, Variant vValue)
This method can be used with the 'dataUpdateReceived' property to trigger the stub to simulate data being received from the server. The 'dataUpdateReceived' property must be supplied with a subject and data map id, in the format NAME|DATA, where DATA is the key for one of the name-value pairs already supplied (caplin.testing.DataSubscriptionFixture.addNamedValueMap).
String | sPropertyName | The property name |
Variant | vValue | The value to set |