From: Griffin C. <gri...@ma...> - 2005-01-01 23:00:09
|
Choy, Looks good! Great job. I merged your branch into the head today. So, I should be packaging it=20= 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 = parameters=20 > in branch RFE_1001778. The changes are ready for your review. I=92m=20 > 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 |