예제 #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 ShouldThrowInterfaceNotFoundException()
        {
            Sioc container = new Sioc();

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