public void ImportPropertyNonRootTransienTest() { FauxExportStrategy basicService = new FauxExportStrategy(() => new BasicService()) { ExportTypes = new[] { typeof(IBasicService) } }; InjectionKernelManager manager = new InjectionKernelManager(null, DependencyInjectionContainer.CompareExportStrategies, new BlackList()); InjectionKernel injectionScope = new InjectionKernel(manager, null, null, "Root", DependencyInjectionContainer.CompareExportStrategies); injectionScope.AddStrategy(basicService); CompiledExportDelegateInfo info = new CompiledExportDelegateInfo { ActivationType = typeof(ImportPropertyService), IsTransient = true, Attributes = new Attribute[0] }; info.ImportProperty(new ImportPropertyInfo { Property = typeof(ImportPropertyService).GetProperty("BasicService") }); FuncCompiledExportDelegate compiledExport = new FuncCompiledExportDelegate(info, (x, y) => new ImportPropertyService(), null, injectionScope); ExportActivationDelegate activationDelegate = compiledExport.CompileDelegate(); Assert.NotNull(activationDelegate); IInjectionScope requestingScope = injectionScope.CreateChildScope(); IImportPropertyService propertyService = (IImportPropertyService)activationDelegate(injectionScope, new InjectionContext(null, requestingScope)); Assert.NotNull(propertyService); Assert.NotNull(propertyService.BasicService); }