public void ErrorsShouldBeInitializedToEmptyIDictionaryImplementation() { var result = new ServiceCheckResult(); Assert.NotNull(result.Errors); Assert.Empty(result.Errors); }
public void EndpointHealthyShouldReturnTrueIfThereIsNoErrorWithGivenUrlInErrors() { var result = new ServiceCheckResult() { Service = TestService }; Assert.True(result.EndpointHealthy(TestService.PublicNetworkUrl)); }
public void EndpointHealthyShouldThrowArgumentExceptionWhenPassedUrlIsNotInTheServicesUrls() { var result = new ServiceCheckResult() { Service = TestService }; Assert.ThrowsAny <ArgumentException>(() => result.EndpointHealthy("http://localhost:9999")); }
public void EndpointHealthyShouldReturnFalseIfThereIsAtLeastOneErrorWithGivenUrlInErrors() { var testUrl = TestService.PublicNetworkUrl; var result = new ServiceCheckResult() { Service = TestService }; result.Errors.Add(testUrl, "some error"); Assert.False(result.EndpointHealthy(testUrl)); }
public void EndpointHealthyShouldThrowArgumentExceptionWhenNullEmptyWhitespaceUrlPassed(string url) { var result = new ServiceCheckResult(); Assert.ThrowsAny <ArgumentException>(() => result.EndpointHealthy(url)); }