background image
<< Editing Message Signatures | Stubs >>
<< Editing Message Signatures | Stubs >>

Message Signature Examples

Scenario Tests
17
Message Signature Examples
This section provides several samples of message signatures.
Example 1 the Name-Only Option
In this example, there is a
getBalance
operation in the
ExecuteTransaction
class. This operation takes one argument--
accountID
. If you want to generate a test
script with two calls to this operation, with each call operating on different
accountID
s, you need to code your message signatures as follows:
getBalance(accountID1)
getBalance(accountID2)
In this example, two datapool fields will be created--one for
accountID1
and one
for
accountID2
.
If you want these operations to go against the same account, driven from a datapool,
you need to code your message signatures as follows:
getBalance(accountID)
getBalance(accountID)
The fact that both operations use the same argument name ensures that they are
assigned to the same datapool field.
If you want to initialize these operations with data and assign them different names,
code the message signatures as follows:
getBalance(accountID1 = 1)
getBalance(accountID2 = 5)
Example 2 the Type-Only Option
If you use the Type-Only option, code your message signatures as follows to get the
same datapool field for both calls:
getBalance( : Long)
getBalance( : Long)
In this case, the name of the datapool field will be taken from the parameter name of
the parameter object.
If you want different datapool fields for each call, you must add the name to the
signature, as in the following example, even if you have set Rose Options to
Type-Only.
getBalance(accountID1 : long = 1)
getBalance(accountID2 : long = 5)