public void The_coordinator_should_uninstall_self_upon_disposal_only_if_it_actively_used_one() { using (var installedCoordinator = new TestableFeatureCoordinator().InstallSelf()) { using (new TestableFeatureCoordinator()) { } Assert.That(TestableFeatureCoordinator.GetInstalled(), Is.SameAs(installedCoordinator)); } }
public void The_coordinator_should_uninstall_self_upon_disposal() { using (var coord = new TestableFeatureCoordinator().InstallSelf()) Assert.That(TestableFeatureCoordinator.GetInstalled(), Is.SameAs(coord)); Assert.That(TestableFeatureCoordinator.GetInstalled(), Is.Null); }