Though I don't have a fix for you the problem comes in with DP and the
"List<string>[] action" param.  I don't know all the details but at one time
(and maybe still exists) there was some goofiness around DP and generics.
Playing with your code I found the following (draw your own conclusions)

The test passes when:


   - I get ride of the array as a param - public virtual void Foo<T>(List<T>
   action) { }
   - I make the method NOT generic - public virtual void Foo(IList<string>
   action) { }

It seems to be an issue with DP and generics, whether an array of lists (of
type T) or making Foo a generic method.

I'll enlist some DP experts who can hopefully help.

Tim

On Sat, Jun 27, 2009 at 12:22 AM, Kenneth Xu <[email protected]> wrote:

>
> Hi,
>
> Here is the test code to reproduce it.
>    public abstract class MyClass
>    {
>        public virtual void Foo<T>(List<T>[] action) { }
>
>        /* ... */
>    }
>
>    [TestFixture] public class MyTest
>    {
>        [Test] public void MyTestCase()
>        {
>            var mockery = new MockRepository();
>            var mock = mockery.PartialMock<MyClass>();
>            mockery.ReplayAll();
>            mock.Foo<string>(null);
>        }
>    }
>
> Am I doing anything wrong here or this is a bug? from Castle dynamic proxy?
>
> Thanks,
> Kenneth
>
> >
>


-- 
Tim Barcz
ASPInsider
http://timbarcz.devlicio.us
http://www.twitter.com/timbarcz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to