public void Can_register_process_virtual_memory_check() { var healthChecks = Enumerable.Empty <HealthCheck>(); var name = "virtual memory"; var registry = new HealthCheckRegistry(healthChecks); registry.AddProcessVirtualMemorySizeCheck(name, 100); registry.Checks.Should().NotBeEmpty(); registry.Checks.Single().Value.Name.Should().Be(name); }
public async Task Can_execute_process_virtual_memory_check() { var healthChecks = Enumerable.Empty <HealthCheck>(); var name = "virtual memory"; var registry = new HealthCheckRegistry(healthChecks); registry.AddProcessVirtualMemorySizeCheck(name, long.MaxValue); var check = registry.Checks.FirstOrDefault(); var result = await check.Value.ExecuteAsync().ConfigureAwait(false); result.Check.Status.Should().Be(HealthCheckStatus.Healthy); }