2010/10/6 Peter van Rooijen <peter@vanrooijen.com>
Hernan,
Isn't the idea of SUnit that you start with a fresh test each time? So you wouldn't restart a test (you could restart/re-run a suite of course).
The change I made is intended to help you when you are debugging a test. For example,in the current implementation when you modify the test while debugging it the test method restarts but (like any method that is restarted) but the method "environment" is not restarted, therefore running the test again could not produce the same result. The change I made send the messages #tearDown and #setUp to the test when it is restared "in the debugger", therefore it restarts the environment also
The only exception to starting fresh is the SUnit resource mechanism.
Well, that's how I seem to remember the philosophy (I haven't used SUnit for some years).
Peter
On Thu, 30 Sep 2010 19:28:59 +0200, Hernan Wilkinson < hernan.wilkinson@10pines.com> wrote:
Hi, I added a new issue (that I think it could be see as an improvement, not an issue) that is related to debugging a test case written with SUnit. The problem is that when you restart a test in the debugger (either by pressing the restart button or compiling the method again) the changes made by the test to the objects initialized in the #setUp are not rollbacked. This change sends the messages #tearDown and #setUp to the test when restarting it, therefore letting the test in the same state as when it was run in the first place.
I uploaded the solution to this issue (or improvement) to pharo inbox under SLICE-Issue-3015-RestartingATestFromTheDebuggerSendsTearDownAndSetUp-HernanWilkinson.2
I hope you like it! Hernan.
-- *Hernán Wilkinson Agile Software Development, Teaching & Coaching Mobile: +54 - 911 - 4470 - 7207 email: hernan.wilkinson@10Pines.com site: http://www.10Pines.com <http://www.10pines.com/>*
-- Peter van Rooijen Nijlring 83 5152 VJ Drunen m: 06-2854 2048
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- *Hernán Wilkinson Agile Software Development, Teaching & Coaching Mobile: +54 - 911 - 4470 - 7207 email: hernan.wilkinson@10Pines.com site: http://www.10Pines.com <http://www.10pines.com/>*