コード例 #1
0
        public void ValidateThrowsErrorsWithoutUrl()
        {
            var processor = this.mocks.Create <IConfigurationErrorProcesser>(MockBehavior.Strict).Object;
            var condition = new UrlPingsTaskCondition();

            Mock.Get(processor).Setup(_processor => _processor.ProcessError("URL cannot be empty")).Verifiable();

            condition.Validate(null, ConfigurationTrace.Start(this), processor);

            this.mocks.VerifyAll();
        }
コード例 #2
0
        public void ValidateThrowsErrorsWithoutUrl()
        {
            var processor = this.mocks.StrictMock <IConfigurationErrorProcesser>();
            var condition = new UrlPingsTaskCondition();

            Expect.Call(() => processor.ProcessError("URL cannot be empty"));

            this.mocks.ReplayAll();
            condition.Validate(null, ConfigurationTrace.Start(this), processor);

            this.mocks.VerifyAll();
        }
コード例 #3
0
        public void ValidatePassesWithUrl()
        {
            var processor = this.mocks.Create <IConfigurationErrorProcesser>(MockBehavior.Strict).Object;
            var condition = new UrlPingsTaskCondition
            {
                Url = "http://somewhere"
            };

            condition.Validate(null, ConfigurationTrace.Start(this), processor);

            this.mocks.VerifyAll();
        }
コード例 #4
0
        public void ValidatePassesWithUrl()
        {
            var processor = this.mocks.StrictMock <IConfigurationErrorProcesser>();
            var condition = new UrlPingsTaskCondition
            {
                Url = "http://somewhere"
            };

            this.mocks.ReplayAll();
            condition.Validate(null, ConfigurationTrace.Start(this), processor);

            this.mocks.VerifyAll();
        }