From: Choy R. <ch...@rc...> - 2005-01-02 05:50:06
|
Griffin, Cool. Actually I wanted to do a few more things before you released it. I realized it'd be cool to have AndRequire() work the same as other predicates where null and other non-IPredicate's translate to IsAnything and IsEqual respectively. But we can put that in the next point release . when I get that expectation thread going. From some of the commit comments, it looks like I've violated some of your coding standards. Can you give me some guidance on exactly what they are? I just followed the Spring.NET coding standards but am willing to adopt whatever is the going convention. It looks like you prefer * No spaces between method definitions. * All fields on the top of a class definition. * Sometimes methods as capitalized and sometimes not . * Space at the beginning and end of a method argument list. Well, from the commit emails that's what I gather. I'll write up a little doc on it, put it in CVS. So branch RFE_1001778 has been retired. RFE 1001778 has been closed. Now we still need a header/license . :P --Choy -----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 Choy, Looks good! Great job. I merged your branch into the head today. So, I should be packaging it up for release today! - Griffin On Dec 29, 2004, at 6:22 PM, Choy Rim wrote: Griffin, I've coded the support for expectations that modify ref/out parameters in branch RFE_1001778. The changes are ready for your review. I'm itching to do a bit more refactoring, like eliminating the redundancies between DynamicMockTests and DynamicOrderedMockTests. But most of the refactorings I have in mind can wait until I merge this branch with the trunk. I've added two unit tests to DynamicMockTests (unit tests were also added for the class generator code) which show how to use the feature. I'll explain some of the basics here. Let's say we have a method that takes a ref parameter: void Increment(ref int index); We can specify our expectation like so: mock.Expect("Increment", new Assign(2).AndRequire(new IsEqual(1)) ); That expectation will check the predicate first, then assign 2 to the ref parameter. Take a look and let me know what you think. When you bless it, I'll merge it into the trunk. --Choy p.s. I'm still wondering about the license and the commit emails . :-P |