Beispiel #1
0
        public void RemoveUnnamedComponent()
        {
            IComponent component = new Component();

            container.Add(component);
            IContainerAdapterSite site = component.Site as IContainerAdapterSite;

            Assert.IsNotNull(site);

            container.Remove(component);
            Assert.IsNull(component.Site);
            Assert.AreEqual(0, container.Components.Count);
            Assert.IsFalse(container.Container.Kernel.HasComponent(site.EffectiveName));
        }