예제 #1
0
        public void Externally_owned_container_should_not_be_disposed()
        {
            var fakesServiceProvider = new FakeServiceProvider();

            var container = new ServicesObjectBuilder(fakesServiceProvider, false);

            container.Dispose();

            Assert.False(fakesServiceProvider.Disposed);
        }
예제 #2
0
        public void Owned_container_should_be_disposed()
        {
            var fakesServiceProvider = new FakeServiceProvider();

            var container = new ServicesObjectBuilder(fakesServiceProvider, true);

            container.Dispose();

            Assert.True(fakesServiceProvider.Disposed);
        }