Exemple #1
0
        protected override void Creating()
        {
            var settings = new RollingFileSettings(Test.Paths.LoggingFolder, "Test", 1024,
                                                   Given.AllowRepeats == null || Given.AllowRepeats, null);

            if (GivensDefined("NullSettings") && Given.NullSettings == true)
            {
                Then.Logger = new RollingFileLogSink(null, verbosity: Given.Verbosity ?? Verbosity.All);
            }
            else
            {
                Then.Logger = new RollingFileLogSink(settings, GetMockLogFileManager(), verbosity: Given.Verbosity ?? Verbosity.All);
            }
        }
        protected override void Creating()
        {
            if (Then.Manager != null)
            {
                return;
            }

            IRollingFileSettings settings = null;

            if (Given.NullSettings == false)
            {
                settings = new RollingFileSettings(Test.Paths.LoggingFolder, "LFMT", Given.Size, false);
            }

            Then.Manager = new RollingFileManager(settings);
        }
        public RunnerSettings(string scriptProjectFolder, string logFolder, string server,
                              bool rollback = false, bool noTransaction = false, bool checkFilesOnly = false, bool bypassCheck = false)
        {
            if (checkFilesOnly && bypassCheck)
            {
                throw new ArgumentException("bypassCheck and checkFilesOnly cannot both be true.", "bypassCheck");
            }

            if (checkFilesOnly && (noTransaction || rollback == false))
            {
                throw new ArgumentException("When 'checkFilesOnly' is True, then 'noTran' must be False and 'rollback' must be True.", "checkFilesOnly");
            }

            _scriptProjectFolder = scriptProjectFolder;
            _server         = server;
            _noTransaction  = noTransaction;
            _rollback       = rollback;
            _checkFilesOnly = checkFilesOnly;
            _bypassCheck    = bypassCheck;

            _fileLoggerSettings = new RollingFileSettings(logFolder, "SqlScriptDeployer");
        }