From: Griffin C. <gri...@ma...> - 2005-01-02 14:55:56
|
Choy, On Jan 1, 2005, at 11:49 PM, Choy Rim wrote: > Cool. Actually I wanted to do a few more things before you released=20 > it. I realized it=92d be cool to have AndRequire() work the same as=20 > other predicates=A0 where null and other non-IPredicate=92s translate = to=20 > IsAnything and IsEqual respectively. But we can put that in the next=20= > point release =85 when I get that expectation thread going. > No problem, since I didn't release last night :) When do you think you=20= could implement this? > =46rom some of the commit comments, it looks like I=92ve violated some = of=20 > your coding standards. Can you give me some guidance on exactly what=20= > they are? I just followed the Spring.NET coding standards but am=20 > willing to adopt whatever is the going convention. It looks like you=20= > prefer > > l=A0=A0=A0=A0=A0 No spaces between method definitions. > > l=A0=A0=A0=A0=A0 All fields on the top of a class definition. > > l=A0=A0=A0=A0=A0 Sometimes methods as capitalized and sometimes not =85 > > l=A0=A0=A0=A0=A0 Space at the beginning and end of a method argument = list. You go most everything right. I just added a few things: 1. All fields defined at top of class, with an _ prefix. 2. Public methods are Pascal cases, SomeMethod, and private & protected=20= methods are Camel Case, someMethod. 3. XML Comments for the public members. I turned this on for the=20 VS.NET projects, so the compiler will tell us when some are missing. that's pretty much it. Not a big problem. > Well, from the commit emails that=92s what I gather. I=92ll write up a=20= > little doc on it, put it in CVS. > I actually have a doc on it. I will put it up on SF tonight, in the=20 documents section. > So branch RFE_1001778 has been retired. RFE 1001778 has been closed.=20= > Now we still need a header/license =85 :P I think I will write a little ruby script to take care of this ;) =20 Been meaning to take that language for a spin. -Griffin > =A0 > > --Choy > > =A0 > > =A0 > > -----Original Message----- > From: Griffin Caprio [mailto:gri...@ma...] > Sent: Saturday, January 01, 2005 6:00 PM > To: Choy Rim > Cc: dot...@li... > Subject: Re: [Dotnetmock-developer] RFE_1001778 - Please review > > =A0 > > Choy, > > Looks good! Great job. > > I merged your branch into the head today. So, I should be packaging=20= > it up for release today! > > - Griffin > On Dec 29, 2004, at 6:22 PM, Choy Rim wrote: > > Griffin, > > =A0 > > I=92ve coded the support for expectations that modify ref/out=20 > parameters in branch RFE_1001778. The changes are ready for your=20 > review. I=92m itching to do a bit more refactoring, like eliminating = the=20 > redundancies between DynamicMockTests and DynamicOrderedMockTests. But=20= > most of the refactorings I have in mind can wait until I merge this=20 > branch with the trunk. > > =A0 > > I=92ve added two unit tests to DynamicMockTests (unit tests were also=20= > added for the class generator code) which show how to use the feature.=20= > I=92ll explain some of the basics here. Let=92s say we have a method = that=20 > takes a ref parameter: > > =A0 > > void Increment(ref int index); > > =A0 > > We can specify our expectation like so: > > =A0 > > mock.Expect(=93Increment=94, > > new Assign(2).AndRequire(new IsEqual(1)) > > ); > > =A0 > > That expectation will check the predicate first, then assign 2 to the=20= > ref parameter. Take a look and let me know what you think. When you=20 > bless it, I=92ll merge it into the trunk. > > =A0 > > --Choy > > =A0 > > p.s. I=92m still wondering about the license and the commit emails =85 = :-P > > =A0 |