Can you provide the rest of the code so I/we can diagnose?

Tim

On Mon, Sep 7, 2009 at 4:16 PM, bill richards
<[email protected]>wrote:

>
> I'm using Visual Studio 8 SP 1.
> TestDriven.Net 2.14.2190 (nUnit 2.4.7.0)
> ReSharper 4.5 C#  (build 4.5.1231)
>
> When I run the test below (using the r-sharper commands)
>
> 1. in debug mode, the test passes
> 2. run mode, the test fails with the message "An attempt was made to
> load a program with an incorrect format"
>
> Is it something I'm doing wrong?
>
>        [Test]
>        public void
> WhenInstantiated_ShouldCallIStatusMessageServicePublishMessage()
>        {
>            var mocks = new MockRepository();
>            var unity = mocks.DynamicMock<IUnityContainer>();
>            var aggregator = mocks.Stub<IEventAggregator>();
>            var service = mocks.DynamicMock<IStatusMessageService>();
>            var region = mocks.DynamicMock<IRegionManager>();
>
>            unity.Stub(container => container.Resolve<IEventAggregator>
> ()).Return(aggregator);
>            unity.Stub(container =>
> container.Resolve<IStatusMessageService>()).Return(service);
>
>            mocks.ReplayAll();
>
>            new ServicesModule2(unity, region).Initialize();
>
>            unity.AssertWasCalled(container =>
> container.Resolve<IStatusMessageService>());
>            service.AssertWasCalled(messageService =>
> messageService.PublishStatusMessage(MessageSent));
>        }
>
> >
>


-- 
Tim Barcz
Microsoft 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