(replying in relation to
http://groups.google.com/group/castle-project-users/browse_thread/thread/291499bdaf73071/64073c72d0b878e8
)

I don't know if you got a test case or what status this is at but I am
still having problems with the latest release.

I am also trying to stub IUnityContainer using Rhino Mocks.

With a bit of investigation I have found that it is this signature
that is causing the problem:

   IUnityContainer RegisterType<TFrom, TTo>() where TTo : TFrom;

And I have isolated it to this test which doesn't require a reference
to Unity or RhinoMocks:

[TestClass]
    public class UnitTest1
    {
        // Current implementation fails with:
        //  System.BadImageFormatException: An attempt was made to
load a program with an incorrect format. (Exception from HRESULT:
0x8007000B).
        [TestMethod]
        public void CreateInterfaceProxyWithoutTarget_GenericError()
        {
            Type type = typeof(ISomeInterface);

            StandardInterceptor interceptor = new StandardInterceptor
();

            List<Type> types = new List<Type>();

            object proxy =
                new ProxyGenerator().CreateInterfaceProxyWithoutTarget
(type, new Type[] {}, interceptor);
        }
    }

    public interface ISomeInterface
    {
        ISomeInterface RegisterType<TFrom, TTo>() where TTo : TFrom;
    }




Can you update me on the status of this problem?

Thanks!

Mark

On Jan 23, 8:27 pm, "Krzysztof Kozmic" <[email protected]> wrote:
> Create a test case for that.
>
> I assume you're using the trunk, are you?
>
> Krzysztof
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to