[Cuis-dev] [ChangeSet] Extract Method - new supported case

Nahuel Garbezza n.garbezza at gmail.com
Sun Apr 5 20:02:02 PDT 2020


Thank you Hernán,

I revisited it and changed it. I extracted the parameters detection and
validation outside the Applier and added two extra test cases for it. Let
me know your thoughts!

Attached is the updated changeset, and a changeset with the new tests (the
ones I sent + two for validating number of arguments).

Nahuel.

El dom., 5 de abr. de 2020 a la(s) 11:15, Hernan Wilkinson (
hernan.wilkinson at 10pines.com) escribió:

> Hi Nahuel,
>  the change is not working correctly. The new tests pass, but when doing
> the extract method in the browser it fails and the reason is because, for
> the same codes as the tests, it is expecting a keyword message and the
> tests are using a unary message. I think you forgot to include something in
> the .cs because you showed me this working.
>  BTW, the validation of the type of selector should be in the
> ExtractMethod class and not in the ExtractMethodApplier. I guess you doit
> in the applier because you need the selector to be valid to create to
> create the new Message, but the validation should be in the ExtractMethod
> anyway and the applier should reuse that validation. It does not matter if
> the validation is done twice in this context. Remember that the
> ExtractMethod can be used from different places, not only the applier, and
> it should behave the same no matter who is using it. Having the tests pass
> and the extract from the browser fail is an example of what should not
> happen.
>
> Cheers!
> Hernan.
>
> On Tue, Mar 31, 2020 at 7:50 PM Nahuel Garbezza via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Hi!
>>
>> Attached is a changeset to support something that was not supported
>> before in the Extract Method refactoring: extracting code containing
>> temporary declaration constructions, this is possible as long as the temps
>> being extracted are not used outside of the extraction interval.
>>
>> The tests for it are in this PR:
>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/pull/165
>>
>> Thanks,
>> Nahuel.
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>
>
> --
>
> *Hernán WilkinsonAgile Software Development, Teaching & Coaching*
> *Phone: +54-011*-4893-2057
> *Twitter: @HernanWilkinson*
> *site: http://www.10Pines.com <http://www.10pines.com/>*
> Address: Alem 896, Floor 6, Buenos Aires, Argentina
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200406/2fcbdc48/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-BaseImageTests-RNG.001.cs.st
Type: application/octet-stream
Size: 3289 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200406/2fcbdc48/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4107-CuisCore-NahuelGarbezza-2020Apr05-23h12m-RNG.001.cs.st
Type: application/octet-stream
Size: 11783 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200406/2fcbdc48/attachment-0003.obj>


More information about the Cuis-dev mailing list