??? The CurrentState property gets the current model state.
202 Testing Systems with Complex State
??? The IsInAcceptingState property returns true if the current model state is an
accepting state. A test run is allowed to finish only in an accepting state.
??? The Reset action restores the model to its initial state. After reset CurrentState
is the initial state of the model. This does not mean that the full tester state is
restored to the initial state. Typically, the strategy keeps history of prior test runs
that affects what action is selected next.
??? The IsActionEnabled method returns true if the given action is enabled in the
current model state. It returns false otherwise, and outputs a reason why the
action is not enabled.
??? The SelectAction method returns an action that is enabled in the current model
state and whose action symbol is in the given set of action symbols. The given
set of action symbols may be a proper subset of ActionSymbols. The method
returns null if no action can be selected.
??? The DoAction method executes the given action in the model so that CurrentState
gets the target state of this transition. A precondition of this method is that the
given action is enabled in the current state. If the action is not enabled, the
behavior of the model program is unpredictable.
The strategy is constructed for a given model program and holds a reference to it.
Pages:
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273