Example #1
0
        public void Container_Proxy_ShouldBeNullChecked()
        {
            Assert.Throws <ArgumentNullException>(() => IServiceContainerAdvancedExtensions.Proxy(null, typeof(IDisposable), null, typeof(InterfaceInterceptor <IDisposable>)));
            Assert.Throws <ArgumentNullException>(() => Container.Proxy(null, null, typeof(InterfaceInterceptor <IDisposable>)));
            //Assert.Throws<ArgumentNullException>(() => Container.Proxy(typeof(IDisposable), null, (Type) null));

            Assert.Throws <ArgumentNullException>(() => IServiceContainerBasicExtensions.Proxy(null, typeof(IDisposable), null, (i, t, o) => o));
            Assert.Throws <ArgumentNullException>(() => Container.Proxy(null, null, (i, t, o) => o));
            //Assert.Throws<ArgumentNullException>(() => Container.Proxy(typeof(IDisposable), null, (Func<IInjector, Type, object, object>) null));
        }
Example #2
0
 public void Container_CreateInjector_ShouldBeNullChecked()
 {
     Assert.Throws <ArgumentNullException>(() => IServiceContainerAdvancedExtensions.CreateInjector(null));
 }