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