Ejemplo n.º 1
0
        public void RemovingItemsFromContainerDoesNotDisposeThem()
        {
            ILifetimeContainer container = new LifetimeContainer();
            DisposableObject   mdo       = new DisposableObject();

            container.Add(mdo);
            container.Remove(mdo);
            container.Dispose();

            Assert.IsFalse(mdo.WasDisposed);
        }
		public void RemovingItemsFromContainerDoesNotDisposeThem()
		{
			ILifetimeContainer container = new LifetimeContainer();
			MockDisposableObject mdo = new MockDisposableObject();

			container.Add(mdo);
			container.Remove(mdo);
			container.Dispose();

			Assert.IsFalse(mdo.WasDisposed);
		}
Ejemplo n.º 3
0
        public void RemovingNonContainedItemDoesNotThrow()
        {
            ILifetimeContainer container = new LifetimeContainer();

            container.Remove(new object());
        }
Ejemplo n.º 4
0
        public void RemovingNonContainedItemDoesNotThrow()
        {
            ILifetimeContainer container = new LifetimeContainer();

            container.Remove(new object());
        }