public void TwoMixinsWithSameInterfaces() { SimpleMixin mixin1 = new SimpleMixin(); OtherMixinImplementingISimpleMixin mixin2 = new OtherMixinImplementingISimpleMixin(); new MixinData(new object[] { mixin1, mixin2 }); }
public void TwoMixinsWithSameInterfaces() { SimpleMixin mixin1 = new SimpleMixin(); OtherMixinImplementingISimpleMixin mixin2 = new OtherMixinImplementingISimpleMixin(); Assert.Throws <ArgumentException>(() => new MixinData(new object[] { mixin1, mixin2 })); }
public void TwoMixinsWithSameInterface() { ProxyGenerationOptions options = new ProxyGenerationOptions(); SimpleMixin mixin1 = new SimpleMixin(); OtherMixinImplementingISimpleMixin mixin2 = new OtherMixinImplementingISimpleMixin(); options.AddMixinInstance(mixin1); options.AddMixinInstance(mixin2); StandardInterceptor interceptor = new StandardInterceptor(); generator.CreateClassProxy(typeof(SimpleClass), options, interceptor); }
public void TwoMixinsWithSameInterface() { ProxyGenerationOptions options = new ProxyGenerationOptions(); SimpleMixin mixin1 = new SimpleMixin(); OtherMixinImplementingISimpleMixin mixin2 = new OtherMixinImplementingISimpleMixin(); options.AddMixinInstance(mixin1); options.AddMixinInstance(mixin2); StandardInterceptor interceptor = new StandardInterceptor(); Assert.Throws <InvalidMixinConfigurationException>(() => generator.CreateClassProxy(typeof(SimpleClass), options, interceptor) ); }