public NServiceBusHealthCheckTestsFixture() { HealthCheckContext = new HealthCheckContext { Registration = new HealthCheckRegistration("Foo", Mock.Of <IHealthCheck>(), null, null) }; MessageSession = new Mock <IMessageSession>(); Logger = new Mock <ILogger <NServiceBusHealthCheck> >(); NServiceBusHealthCheck = new NServiceBusHealthCheck(MessageSession.Object, Logger.Object); }
public NServiceBusHealthCheckTestsFixture() { HealthCheckContext = new HealthCheckContext { Registration = new HealthCheckRegistration("Foo", Mock.Of <IHealthCheck>(), null, null) }; Interval = TimeSpan.FromMilliseconds(100); Timeout = TimeSpan.FromMilliseconds(500); CancellationToken = new CancellationToken(); MessageSession = new Mock <IMessageSession>(); DistributedCache = new Mock <IDistributedCache>(); HealthCheck = new NServiceBusHealthCheck(MessageSession.Object, DistributedCache.Object) { Interval = Interval, Timeout = Timeout }; Exception = new Exception("Foobar"); }
public Task <HealthCheckResult> CheckHealthAsync() { return(NServiceBusHealthCheck.CheckHealthAsync(HealthCheckContext)); }