|
From: John P. <Joh...@de...> - 2005-05-17 14:31:15
|
I've attached the two files I changed (DynamicMock.cs and = DynamicMockTest.cs) as well as a diff. I'm new to this submitting = thing, so if there's some other way you'd like this done in future, just = let me know. The fix changes the "checkReturnTypeIsValid" method, which now delegates = to a "findReturnType" method. If the mocked object is mocking an = interface and the given method or property is not found in said = interface, the method will traverse the interface's inheritance = hierarchy looking for the method/property in any parents. To be honest, I'm not sure why calling Type.GetMethod(...) on an = interface as DynamicMock.cs was doing doesn't return inherited members = in the first place, but this seems to fix the problem. John. -----Original Message----- From: nmo...@li... = [mailto:nmo...@li...] On Behalf Of Thibaut = Barr=E8re Sent: Monday, May 16, 2005 5:15 PM To: John Price; Steve Freeman Cc: nmo...@li... Subject: Re: [Nmock-general] Couple questions and suggestions > More generally, it's not really clear where the "official" source for > information on NMock is. Clicking on the "Tracker" link on NMock.org = takes > you to one bug tracking system, while another set of issues are = tracked on > SourceForge. In general, the only reference the NMock.org page makes = to > SourceForge is for downloading source or binaries. Steve, can't we just bring back the issues from sf to the Jira tracker, and close the sf one ? Having the two trackers is really confusing. > Anyway, the reason I emailed Joe in the first place was that I ran = into bug > "NMO-44" as tracked by the JIRA bug tracker ("Using DynamicMock with > inheriting interfaces throws NullReferenceException") and think that = I've > got a fix for it (and a unit test to check for it). How can I go = about > submitting my change back to the project for review? Can you post the patch + tests here if you didn't send it already to = someone ? Thibaut ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_idt12&alloc_id=16344&op=3Dick _______________________________________________ Nmock-general mailing list Nmo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-general |