public void Remove_ShouldCall_OriginRemove()
        {
            var record = new SafeStartupRecord(_logger, _origin);

            record.Remove();

            _origin.Received().Remove();
        }
        public void Remove_ShouldPass_Exception()
        {
            _origin.When(x => x.Remove()).Do(_ => throw new Exception());
            var record = new SafeStartupRecord(_logger, _origin);

            Action action = () => record.Remove();

            action.Should().Throw <Exception>();
        }
        public void Remove_ShouldSuppress_RegistryAccessException(Type exceptionType)
        {
            var exception = (Exception)Activator.CreateInstance(exceptionType);

            _origin.When(x => x.Remove()).Do(_ => throw exception);
            var record = new SafeStartupRecord(_logger, _origin);

            Action action = () => record.Remove();

            action.Should().NotThrow();
        }