Exemplo n.º 1
0
        public void ShouldResolveTypeWithOneParameterlessCtor()
        {
            Sioc container = new Sioc();
            container.Register<IInterface, ConcreteWithOneParameterlessCtor>();
            var concrete = container.Resolve<IInterface>();

            Assert.AreEqual(typeof(ConcreteWithOneParameterlessCtor), concrete.GetType());
        }
Exemplo n.º 2
0
        public void ShouldThrowInterfaceNotFoundException()
        {
            Sioc container = new Sioc();

            Assert.Throws<InterfaceNotFoundException>(() => container.Resolve<IInterface>());
        }