What if you forget about the overhead of Rhino.Mocks and just create a
real .NET class:
public class ServiceStub : IRasterImageService
{
....
}
Do you get the same error?
---
Patrick Steele
http://weblogs.asp.net/psteele
On Wed, Oct 3, 2012 at 12:20 PM, Scott_M
<[email protected]> wrote:
> Using Windsor 3.1 in VS2012. I have a master installer class that registers
> all my service dependencies. One of the required dependencies is not
> used/needed in the particular solution so I attempted to stub it and
> register the stub (Rhinomocks) like so:
>
>
> IRasterImageService fakeRasterSvc =
> MockRepository.GenerateStub<IRasterImageService>();
>
> container.Kernel.AddComponentInstance<IRasterImageService>(fakeRasterSvc);
>
> This results in the following error:
> "IRasterImageService could not be registered. There is already a component
> with that name. Did you want to modify the existing component instead? If
> not, make sure you specify a unique name."
>
> The odd thing is that nowhere else is this component registered. I can
> comment out that code and get an error saying that IRasterImageService was
> not registered.
> What am I doing wrong?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/castle-project-users/-/Jxxbf_4nlG8J.
> 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/castle-project-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" 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/castle-project-users?hl=en.