Пример #1
0
        public void ShouldResolveTypeWithOneParameterlessCtor()
        {
            Sioc container = new Sioc();
            container.Register<IInterface, ConcreteWithOneParameterlessCtor>();
            var concrete = container.Resolve<IInterface>();

            Assert.AreEqual(typeof(ConcreteWithOneParameterlessCtor), concrete.GetType());
        }
Пример #2
0
 public void ShouldThrowNotAssignableException()
 {
     Sioc container = new Sioc();
     
     Assert.Throws<NotAssignableFromType>( () => container.Register<IInterface, ConcreteNotImplementsInterface>() );
 }