public void Deactivate_FromDisposedState_ShouldThrow()
        {
            using var scope = new ManuallyActivatedScope(1, AmbientScopeOption.ForceCreateNew);
            scope.Dispose();

            Assert.Throws <InvalidOperationException>(() => scope.Deactivate());
        }
        public void Activate_AfterDisposal_ShouldThrow()
        {
            using var scope = new ManuallyActivatedScope(1, AmbientScopeOption.NoNesting, noNestingIgnoresDefaultScope: true);
            scope.Dispose();

            Assert.ThrowsAny <InvalidOperationException>(() => scope.Activate());
        }
        public void Dispose_FromStateNew_ShouldResultInStateDisposed()
        {
            using var scope = new ManuallyActivatedScope(1, AmbientScopeOption.ForceCreateNew);

            scope.Dispose();

            Assert.Equal(AmbientScopeState.Disposed, scope.State);
        }