예제 #1
0
 private void Given_a_healthy_endpoint_working_for_some_time()
 {
     _restEndpoint = MockWebEndpointFactory.CreateNew();
     _restEndpoint.SetupStatusPlainResponse(HttpStatusCode.OK, "hello world!");
     _identifier = _client.RegisterEndpoint(MonitorTypes.Http, _restEndpoint.StatusAddress, "test", "test");
     Thread.Sleep((int)(Timeouts.HealthCheckInterval.TotalMilliseconds * 3));
 }
예제 #2
0
        private void SetupHttpEndpoint(HttpStatusCode httpStatusCode, string name, string group, string[] tags, EndpointStatus expectedStatus)
        {
            var endpoint = MockWebEndpointFactory.CreateNew();

            _endpoints.Add(endpoint);

            endpoint.SetupStatusResponse(httpStatusCode);
            var identifier = _client.RegisterEndpoint(MonitorTypes.Http, endpoint.StatusAddress, group, name, tags);

            _client.EnsureStatusChanged(identifier, expectedStatus);
        }
 private void Given_a_rest_endpoint()
 {
     _restEndpoint = MockWebEndpointFactory.CreateNew();
 }
예제 #4
0
 private void Given_a_registered_endpoint()
 {
     _restEndpoint = MockWebEndpointFactory.CreateNew();
     _identifier   = _client.RegisterEndpoint(MonitorTypes.Http, _restEndpoint.StatusAddress, "test", "test");
 }