|
From: Steve F. <st...@m3...> - 2007-09-12 12:53:20
|
This still feels like the wrong solution. We went round this loop a while ago and it just didn't work. You might also consider having more than one test case (they don't have to be one-to-one with classes) to manage different combinations. S. On 11 Sep 2007, at 23:50, rdr...@ar... wrote: > That would be a bahavior which would fix my "problem". > > Maybe enable a flag in the mockery which defines the "search order" > for the expectations? > > I would find this behavior much more logical then the other way > around. Without it i have no way to override something i setup once > without resulting to "trickery" (e.g. defining something that i > consider a stub to be an expect.once so i can "remove" it with the > exact call) > > So instead of having my generic setup which creates everything > thats not important for my test "outside" the test function, and > only setting one expectation i am actually currently testing inside > of my test. And usually this leads to a buch of helper setup > functions, which usually only differ in one line, and its not > trivial to refactor the other N lines out... Since the other n-1 > functions would all differ in one different line... > > Also i want to avoid and "logic" in my tests/setups... so a > function with a flag to skip one of those lines also leaves a bad > feeling... > > Anyway... short conclusion: 2 Thumbs up for a flag that defines the > search direction ;) Steve Freeman Winner of the Agile Alliance Gordon Pask award 2006 http://www.m3p.co.uk M3P Limited. Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ. Company registered in England & Wales. Number 03689627 |