public void TestDependencyIs_Resolve_TheLastestRegisterType()
        {
            var iocManager = new IocManager();

            iocManager.Register <IAbpModuleManager, TestAbpMoudleManger>();
            IConventionalDependencyRegistrar register = new DependencyConventionalRegistrar(iocManager);

            var Assembly1 = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(a => a.GetName().Name == "Blocks.Framework.TestAssembly1");
            var Assembly2 = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(a => a.GetName().Name == "Blocks.Framework.TestAssembly2");

            register.RegisterAssembly(new Blocks.Framework.Ioc.Dependency.ConventionalRegistrationContext(Assembly1, iocManager, null));
            register.RegisterAssembly(new Blocks.Framework.Ioc.Dependency.ConventionalRegistrationContext(Assembly2, iocManager, null));

            var actualObject = iocManager.Resolve <ITestDependency>();

            Assert.True(actualObject is TestDependencySecond);



            var iocManager2 = new IocManager();

            iocManager2.Register <IAbpModuleManager, TestAbpMoudleManger>();
            IConventionalDependencyRegistrar register2 = new DependencyConventionalRegistrar(iocManager2);

            register2.RegisterAssembly(new Blocks.Framework.Ioc.Dependency.ConventionalRegistrationContext(Assembly2, iocManager2, null));
            register2.RegisterAssembly(new Blocks.Framework.Ioc.Dependency.ConventionalRegistrationContext(Assembly1, iocManager2, null));

            var actualObject2 = iocManager2.Resolve <ITestDependency>();

            Assert.True(actualObject is TestDependencyFirst);
        }
        public void TestActalObjectReplaceNullObject()
        {
            IConventionalDependencyRegistrar register = new DependencyConventionalRegistrar(this.LocalIocManager);

            register.RegisterAssembly(new Blocks.Framework.Ioc.Dependency.ConventionalRegistrationContext(this.GetType().Assembly, LocalIocManager, null));

            var actualObject = this.LocalIocManager.Resolve <INullObjectTest>();

            Assert.True(actualObject is NullObjectTestActual);
        }
        public void TestActalObjectReplaceNullObject()
        {
            var iocManager = new IocManager();

            iocManager.Register <IAbpModuleManager, TestAbpMoudleManger>();
            IConventionalDependencyRegistrar register = new DependencyConventionalRegistrar(iocManager);

            register.RegisterAssembly(new Blocks.Framework.Ioc.Dependency.ConventionalRegistrationContext(this.GetType().Assembly, iocManager, null));

            var actualObject = iocManager.Resolve <INullObjectTest>();

            Assert.True(actualObject is NullObjectTestActual);
        }