[Webtest] [dev] refactoring
Paul King
webtest@lists.canoo.com
Fri, 05 Aug 2005 00:54:23 +1000
Denis N. Antonioli wrote:
>
> On 4 août 05, at 15:22, Paul King wrote:
>
>> Dierk Koenig wrote:
>>
>>> The internal state of a step consists of - information that only
>>> this step cares about,
>>> e.g. its attributes
>>> - information that is common for all steps
>>> and is of 'read only' nature, e.g. the testSpec
>>> - information that is shared, handed over from step
>>> to step, and is of 'read/write' nature.
>>> The latter is called the context and extracted into
>>> the Context class.
>>> This is the logic of the separation and it is reflected in the
>>> current object design.
>>>
>>
>> I mostly like the current objects (add Configuration to the above list)
>> and think keeping them (perhaps with some refactoring) would be useful.
>> However we shouldn't need to do both of the following:
>>
>> step.setContext(context)
>> step.doExecute(context)
>>
>> Getting rid of one or the other would be good.
>
>
> gosh.
>
> dna
>
So we end up with either:
step.setContext(context);
step.doExecute();
or (just):
step.doExecute(context);
if it wasn't clear before.
Paul.