Esempio n. 1
0
        public void Externally_owned_container_should_not_be_disposed()
        {
            var fakeContainer = new FakeContainer();

            var container = new UnityObjectBuilder(fakeContainer, false);

            container.Dispose();

            Assert.False(fakeContainer.Disposed);
        }
Esempio n. 2
0
        public void Owned_container_should_be_disposed()
        {
            var fakeContainer = new FakeContainer();

            var container = new UnityObjectBuilder(fakeContainer, true);

            container.Dispose();

            Assert.True(fakeContainer.Disposed);
        }