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); }
public void Owned_container_should_be_disposed() { var fakesServiceProvider = new FakeServiceProvider(); var container = new ServicesObjectBuilder(fakesServiceProvider, true); container.Dispose(); Assert.True(fakesServiceProvider.Disposed); }