Activity 16: Specify input parameters for the IService interface
To be able to generate tests, first input parameters for commands and signals have to be specified. For the IService interface this means that input values for the LoadProduct command have to be specified.
-
In folder IService, create a file IService.params (right click on folder, select New > File).
-
Insert the following text in the file (note that it will lead to errors):
import "IService.interface" interface: IService
-
After the last line, use content assist CTRL+SPACE and select Autocomplete missing triggers. This leads to a template which requires one or more input values for the command LoadProduct in all relevant states of the interface model.
-
Replace each occurrence of PRODUCT in the template by an instance of ProductName, so ProductName::WATER, ProductName::JUICE, or ProductName::COLA. Note that multiple parameters are allowed, for instance
trigger: LoadProduct state: Operational params: ( ProductName::COLA ) params: ( ProductName::JUICE )