Example #1
0
        public void RegisterService_NoConstructorValid()
        {
            var container    = new TinyContainer();
            var typeInstance = new EmptyConreteType();

            container.RegisterService <IInterfaceParam, InterfaceParam>();
            container.RegisterService <ConcreteTypeMultiParam>();

            var instance = container.ResolveService <ConcreteTypeMultiParam>();
        }
Example #2
0
        public void RegisterService_OnlyOneConstructorValid()
        {
            var container    = new TinyContainer();
            var typeInstance = new EmptyConreteType();

            container.RegisterService <SecondParam>();
            container.RegisterService <IInterfaceParam, InterfaceParam>();
            container.RegisterService <ConcreteTypeMultiParam>();

            var instance = container.ResolveService <ConcreteTypeMultiParam>();

            Assert.AreEqual(true, instance != null);
        }