public void Externally_owned_container_should_not_be_disposed() { var fakeScope = new FakeLifetimeScope(); var container = new AutofacObjectBuilder(fakeScope, false); container.Dispose(); Assert.False(fakeScope.Disposed); }
public void Owned_container_should_be_disposed() { var fakeScope = new FakeLifetimeScope(); var container = new AutofacObjectBuilder(fakeScope, true); container.Dispose(); Assert.True(fakeScope.Disposed); }