public void HealthMonitorPushClient_should_allow_empty_url_and_disable_integration(string url) { var notifier = HealthMonitorPushClient.UsingHealthMonitor(url) .DefineEndpoint(b => b.DefineAddress("a").DefineGroup("b").DefineName("c").DefinePassword("t")) .WithHealthCheck(Mock.Of <IHealthChecker>()) .StartHealthNotifier(); Assert.Null(notifier); }
private static IEndpointHealthNotifier StartHealthMonitorIntegration() { return(HealthMonitorPushClient.UsingHealthMonitor(ConfigurationManager.AppSettings["HealthMonitorUrl"]) .DefineEndpoint(builder => builder .DefineGroup("Examples") .DefineName("Service With Push Integration") .DefineTags("example") .DefineAddress("ServiceWithPushIntegration_node1") .DefinePassword("12345678")) .WithHealthCheck(new HealthChecker()) .StartHealthNotifier()); }
private void Given_an_endpoint_with_push_integration() { _endpointUniqueName = Guid.NewGuid().ToString(); _endpointHostName = Guid.NewGuid().ToString(); _endpointGroupName = Guid.NewGuid().ToString(); _endpointName = Guid.NewGuid().ToString(); _endpointTags = new[] { "tag1", "tag2" }; _password = Guid.NewGuid().ToString(); _pushClient = HealthMonitorPushClient.UsingHealthMonitor(ClientHelper.GetHealthMonitorUrl().ToString()) .DefineEndpoint(b => b .DefineAddress(_endpointHostName, _endpointUniqueName) .DefineGroup(_endpointGroupName) .DefineName(_endpointName) .DefineTags(_endpointTags) .DefinePassword(_password)) .WithHealthCheck(this); _currentEndpointStatus = HealthStatus.Healthy; }
public void HealthMonitorPushClient_should_require_not_null_url() { Assert.Throws <ArgumentNullException>(() => HealthMonitorPushClient.UsingHealthMonitor(null)); }