Example #1
0
        public void ValidateDoesNotAllowBothQuietAndVerbose()
        {
            var trace          = new ConfigurationTrace(null, null);
            var errorProcesser = this.mocks.Create <IConfigurationErrorProcesser>(MockBehavior.Strict).Object;

            Mock.Get(errorProcesser).Setup(_errorProcesser => _errorProcesser.ProcessError("Cannot have both verbose and quiet set")).Verifiable();
            var task = new AntsPerformanceProfilerTask();

            task.Quiet   = true;
            task.Verbose = true;
            task.Validate(null, trace, errorProcesser);
            this.mocks.VerifyAll();
        }
Example #2
0
        public void ValidateDoesNotAllowBothQuietAndVerbose()
        {
            var trace          = new ConfigurationTrace(null, null);
            var errorProcesser = this.mocks.StrictMock <IConfigurationErrorProcesser>();

            Expect.Call(() => errorProcesser.ProcessError("Cannot have both verbose and quiet set"));
            var task = new AntsPerformanceProfilerTask();

            task.Quiet   = true;
            task.Verbose = true;
            this.mocks.ReplayAll();
            task.Validate(null, trace, errorProcesser);
            this.mocks.VerifyAll();
        }