Just so we are clear, you expect
Expect.Call(mockService.Identity.Interface1.Interface2.Interface3.Name).Return("foo")
to work as well, right?

Also, every time I get source from the rhino trunk I have to go in and
add the missing assemblyinfo.cs files to all the projects to get it to
compile. Any good reason for that?

On Oct 8, 1:54 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> No, you don't need to touch dynamic proxy.The behavior can be controlled
> from RecordMockState. Take a look at RhinoIntercepor, as an example of how
> we manage things.
> This is basically making rhino mocks return a mock for an interface method
> cal.
>
>
>
> On Wed, Oct 8, 2008 at 6:32 AM, webpaul <[EMAIL PROTECTED]> wrote:
>
> > Regarding
> >http://ayende.com/Blog/archive/2008/10/08/rhino-mocks-challenge-imple...
> > :
>
> > Do you expect that Identity is not null in this test and should have
> > an implementation? If so, I'm curious whether you expect changes to
> > Castle.DynamicProxy.ProxyGenerator or not. In the below test
> > mockService.Identity is null and gives an exception as such. Do you
> > expect that and want that fixed or am I missing something?
>
> >    public interface ISomeInterface
> >    {
> >        string Name { get; set; }
> >    }
>
> >    public interface IMyService
> >    {
> >        ISomeInterface Identity { get; set;}
> >    }
>
> >    [TestFixture]
> >        public class FluentMocksTests
> >        {
> >                [Test]
> >                public void CanCallSomeRandomInterfaceProperty()
> >                {
> >            var mockService =
> > MockRepository.GenerateMock<IMyService>();
> >            Expect.Call(mockService.Identity.Name).Return("foo");
> >            Assert.AreEqual("foo", mockService.Identity.Name);
> >                }
> >        }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" 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/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to