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(); }
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(); }
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(); }
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(); }