|
From: Nat P. <nat...@b1...> - 2003-07-18 13:52:56
|
We've talked about that and I think everybody agrees that it's a good idea.
It's just that nobody has implemented it yet. I think that their should be
an overloaded version that takes a String that means the same as passing an
IsEqual constraint.
Cheers,
Nat.
_______________________
Dr. Nathaniel Pryce
B13media Ltd.
http://www.b13media.com
+44 (0)7712 526 661
----- Original Message -----
From: "Joe Walnes" <jo...@tr...>
To: "Nat Pryce" <nat...@b1...>
Cc: <moc...@li...>
Sent: Friday, July 18, 2003 9:27 AM
Subject: Re: [MO-java-users] RegEx-like method names for matchAndReturn?
> Not sure if this has been mentioned yet...
>
> It would be much more flexible if the first argument of all the match
> and expect methods (i.e. the name) took a Constraint instead of a String.
>
> -joe
>
> Nat Pryce wrote:
>
> >The MockObjects website has example code that does almost exactly what
you
> >want.
> >
> >Look at http://www.mockobjects.com/wiki/CallableDecorators
> >
> >Cheers,
> > Nat.
> >_______________________
> >Dr. Nathaniel Pryce
> >B13media Ltd.
> >http://www.b13media.com
> >+44 (0)7712 526 661
> >
> >----- Original Message -----
> >From: <mai...@ji...>
> >To: <moc...@li...>
> >Sent: Thursday, July 17, 2003 7:26 PM
> >Subject: [MO-java-users] RegEx-like method names for matchAndReturn?
> >
> >
> >
> >
> >>Is there any way to have Mock.matchAndReturn() match against method
> >>names using wildcards? For example, I'd like to:
> >>
> >>Mock mock = new Mock( InterfaceWithLotsOfBooleans.class );
> >>mock.matchAndReturn( "is*", false );
> >>
> >>Which for any isProperty method call would return false.
> >>
> >>I figure that some kind of callable subclass is necessary, but with very
> >>little in the way of javadocs (and the unit tests aren't helpful here),
> >>I don't know where to go.
> >>
> >>;ted
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This SF.net email is sponsored by: VM Ware
> >>With VMware you can run multiple operating systems on a single machine.
> >>WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> >>same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> >>_______________________________________________
> >>Mockobjects-java-users mailing list
> >>Moc...@li...
> >>https://lists.sourceforge.net/lists/listinfo/mockobjects-java-users
> >>
> >>
> >
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: VM Ware
> >With VMware you can run multiple operating systems on a single machine.
> >WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> >same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> >_______________________________________________
> >Mockobjects-java-users mailing list
> >Moc...@li...
> >https://lists.sourceforge.net/lists/listinfo/mockobjects-java-users
> >
> >
>
>
|