From: Steve F. <st...@m3...> - 2003-07-05 15:18:39
|
being at a loose end, I took an executive decision and added a first cut at ActiveCall to the head release. I tagged before doing this so we can always roll back. It really starts to make the code collapse and I can see how some of the tests could be simplified. Any objections? S. |
From: Tim M. <tim...@po...> - 2003-07-05 19:24:55
|
The idea of ActiveCall is a good one (I'm not too keen on the name myself - why is it active?) - Actually more to the point I'm kind of suprised its got no behavior at all (making it even less active?). I would expect it to do work in deciding whether it was equal to a Method (e.g. what invoke() gets) ...??? Tim > -----Original Message----- > From: moc...@li... > [mailto:moc...@li...]On Behalf Of > Steve Freeman > Sent: 05 July 2003 16:18 > To: 'Mockobjects-Java-Dev' > Subject: [MO-java-dev] ActiveCall class > > > being at a loose end, I took an executive decision and added a first cut > at ActiveCall to the head release. I tagged before doing this so we can > always roll back. It really starts to make the code collapse and I can > see how some of the tests could be simplified. > > Any objections? > > S. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003 |
From: Joe W. <jo...@tr...> - 2003-07-05 19:37:13
|
Tim Mackinnon wrote: >The idea of ActiveCall is a good one (I'm not too keen on the name myself - >why is it active?) - Actually more to the point I'm kind of suprised its got >no behavior at all (making it even less active?). > How about InactiveCall? -joe |
From: Nat P. <nat...@b1...> - 2003-07-05 21:58:54
|
The name was meant to indicate that it represents the call currently "active" in the mock. I agree that there is a better name. Personally I would like to name it "Call" because all the other uses of the word "call" don't actually refer to calls but to things that can be called. Perhaps Invocation would be a better name. There is actually very little behaviour required, as far as I have used it. It doesn't need to be compared to a method: it is constructed *from* a method. Other objects (matchers, stubs, etc.) examine the state that it carries. I guess some of that behaviour could be moved into the ActiveCall class but that feels wrong to me. Why should an invocation have knowledge of the behaviour caused by that invocation? Cheers, Nat. _______________________ Dr. Nathaniel Pryce B13media Ltd. http://www.b13media.com +44 (0)7712 526 661 ----- Original Message ----- From: "Tim Mackinnon" <tim...@po...> To: "Steve Freeman" <st...@m3...>; "'Mockobjects-Java-Dev'" <moc...@li...> Sent: Saturday, July 05, 2003 8:28 PM Subject: RE: [MO-java-dev] ActiveCall class > The idea of ActiveCall is a good one (I'm not too keen on the name myself - > why is it active?) - Actually more to the point I'm kind of suprised its got > no behavior at all (making it even less active?). > > I would expect it to do work in deciding whether it was equal to a Method > (e.g. what invoke() gets) ...??? > > Tim > > > -----Original Message----- > > From: moc...@li... > > [mailto:moc...@li...]On Behalf Of > > Steve Freeman > > Sent: 05 July 2003 16:18 > > To: 'Mockobjects-Java-Dev' > > Subject: [MO-java-dev] ActiveCall class > > > > > > being at a loose end, I took an executive decision and added a first cut > > at ActiveCall to the head release. I tagged before doing this so we can > > always roll back. It really starts to make the code collapse and I can > > see how some of the tests could be simplified. > > > > Any objections? > > > > S. > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > > _______________________________________________ > > Mockobjects-java-dev mailing list > > Moc...@li... > > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev > > > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003 > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev |
From: Tim M. <tim...@po...> - 2003-07-05 22:56:15
|
The way I see it - you are (or want to) construct a MethodMatcher based on a name or name constraint and parameters or parameter contraints (in dot net I believe you additional get a return type as well). I would expect this object to compare itself to a java Method object (at invoke time) and if it matches, do something (e.g. throw an exception or answer a value etc.) - the doing could involve a series of decorations as we have now (although my hunch is that we can simplify these down a bit). So the code that I see now - doesn't really work in this manner? I also feel - given some of the questions/features that other people have asked for, that matching is sometimes something people want different policies for on a method by method basis (e.g. match once only, match one or more) - (which combined with your excellent auto-return type stub, can give useful behavior especially in a name match constraint scenario like StartsWith("get")) So I think I would take the pieces that we have and combine them in a much different way. Tim > -----Original Message----- > From: moc...@li... > [mailto:moc...@li...]On Behalf Of > Nat Pryce > Sent: 05 July 2003 22:55 > To: Tim Mackinnon; Steve Freeman; 'Mockobjects-Java-Dev' > Subject: Re: [MO-java-dev] ActiveCall class > > > The name was meant to indicate that it represents the call currently > "active" in the mock. I agree that there is a better name. Personally I > would like to name it "Call" because all the other uses of the word "call" > don't actually refer to calls but to things that can be called. > > Perhaps Invocation would be a better name. > > There is actually very little behaviour required, as far as I > have used it. > It doesn't need to be compared to a method: it is constructed *from* a > method. Other objects (matchers, stubs, etc.) examine the state that it > carries. I guess some of that behaviour could be moved into the > ActiveCall > class but that feels wrong to me. Why should an invocation have knowledge > of the behaviour caused by that invocation? > > Cheers, > Nat. > _______________________ > Dr. Nathaniel Pryce > B13media Ltd. > http://www.b13media.com > +44 (0)7712 526 661 > > ----- Original Message ----- > From: "Tim Mackinnon" <tim...@po...> > To: "Steve Freeman" <st...@m3...>; "'Mockobjects-Java-Dev'" > <moc...@li...> > Sent: Saturday, July 05, 2003 8:28 PM > Subject: RE: [MO-java-dev] ActiveCall class > > > > The idea of ActiveCall is a good one (I'm not too keen on the name > myself - > > why is it active?) - Actually more to the point I'm kind of suprised its > got > > no behavior at all (making it even less active?). > > > > I would expect it to do work in deciding whether it was equal > to a Method > > (e.g. what invoke() gets) ...??? > > > > Tim --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003 |
From: Steve F. <st...@m3...> - 2003-07-05 23:14:29
|
Nat Pryce wrote: > Perhaps Invocation would be a better name. +1 I think you're right about Call, but that's just too confusing a name. We should move more things named Call, such as the CallFactory, to Callable. S. |