Пример #1
0
        public void IsAuditingController()
        {
            var options = new AuditingOptions();

            options.IsAuditingController().ShouldBeFalse();
            options.EnableAuditingController();
            options.IsAuditingController().ShouldBeTrue();
            options.DisableAuditingController();
            options.IsAuditingController().ShouldBeFalse();
        }
Пример #2
0
        public void DisableAuditingController()
        {
            var options = new AuditingOptions();

            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingController)).ShouldBeFalse();
            options.EnableAuditingController();
            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingController)).ShouldBeTrue();
            options.DisableAuditingController();
            options.GetOption <bool>(nameof(AuditingOptionsExtensions.IsAuditingController)).ShouldBeFalse();
        }